[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-commit] Changes to auctex/tex.el,v
From: |
Ralf Angeli |
Subject: |
[AUCTeX-commit] Changes to auctex/tex.el,v |
Date: |
Sun, 04 Mar 2007 19:56:23 +0000 |
CVSROOT: /cvsroot/auctex
Module name: auctex
Changes by: Ralf Angeli <angeli> 07/03/04 19:56:23
Index: tex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/tex.el,v
retrieving revision 5.604
retrieving revision 5.605
diff -u -b -r5.604 -r5.605
--- tex.el 25 Feb 2007 15:32:30 -0000 5.604
+++ tex.el 4 Mar 2007 19:56:23 -0000 5.605
@@ -4229,10 +4229,14 @@
in the buffer."
(TeX-find-balanced-brace -1 depth limit))
-(defun TeX-find-macro-boundaries ()
+(defun TeX-find-macro-boundaries (&optional lower-bound)
"Return a list containing the start and end of a macro.
-Arguments enclosed in brackets or braces are considered part of
-the macro."
+If LOWER-BOUND is given, do not search backward further than this
+point in buffer. Arguments enclosed in brackets or braces are
+considered part of the macro."
+ (save-restriction
+ (when lower-bound
+ (narrow-to-region lower-bound (point-max)))
(let ((orig-point (point))
start-point)
;; Point is located directly at the start of a macro. (-!-\foo{bar})
@@ -4268,7 +4272,7 @@
(goto-char (TeX-find-macro-end-helper start-point))
(if (< orig-point (point))
(cons start-point (point))
- nil)))))
+ nil))))))
(defun TeX-find-macro-end-helper (start)
"Find the end of a macro given its START.
@@ -4312,11 +4316,12 @@
(t
(throw 'found (point)))))))))
-(defun TeX-find-macro-start ()
+(defun TeX-find-macro-start (&optional limit)
"Return the start of a macro.
-Arguments enclosed in brackets or braces are considered part of
-the macro."
- (car (TeX-find-macro-boundaries)))
+If LIMIT is given, do not search backward further than this point
+in buffer. Arguments enclosed in brackets or braces are
+considered part of the macro."
+ (car (TeX-find-macro-boundaries limit)))
(defun TeX-find-macro-end ()
"Return the end of a macro.
- [AUCTeX-commit] Changes to auctex/tex.el,v,
Ralf Angeli <=