auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] Changes to reftex/lisp/reftex-parse.el,v


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to reftex/lisp/reftex-parse.el,v
Date: Thu, 04 Oct 2012 20:03:27 +0000

CVSROOT:        /sources/auctex
Module name:    reftex
Changes by:     Ralf Angeli <angeli>    12/10/04 20:03:25

Index: lisp/reftex-parse.el
===================================================================
RCS file: /sources/auctex/reftex/lisp/reftex-parse.el,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- lisp/reftex-parse.el        3 May 2008 09:18:28 -0000       1.38
+++ lisp/reftex-parse.el        4 Oct 2012 20:03:24 -0000       1.39
@@ -1,17 +1,16 @@
 ;;; reftex-parse.el --- parser functions for RefTeX
 
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2012 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <address@hidden>
 ;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,16 +18,14 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 ;;; Code:
 
 (eval-when-compile (require 'cl))
-(provide 'reftex-parse)
+
 (require 'reftex-base)
 
 (defmacro reftex-with-special-syntax (&rest body)
@@ -190,6 +187,9 @@
       (push file file-list))
     (nreverse file-list)))
 
+;; Bound in the caller, reftex-do-parse.
+(defvar index-tags)
+
 (defun reftex-parse-from-file (file docstruct master-dir)
   ;; Scan the buffer for labels and save them in a list.
   (let ((regexp (reftex-everything-regexp))
@@ -394,7 +394,7 @@
 
 (defun reftex-section-info (file)
   ;; Return a section entry for the current match.
-  ;; Carefull: This function expects the match-data to be still in place!
+  ;; Careful: This function expects the match-data to be still in place!
   (let* ((marker (set-marker (make-marker) (1- (match-beginning 3))))
          (macro (reftex-match-string 3))
          (prefix (save-match-data
@@ -450,7 +450,7 @@
 (defvar test-dummy)
 (defun reftex-index-info (file)
   ;; Return an index entry for the current match.
-  ;; Carefull: This function expects the match-data to be still in place!
+  ;; Careful: This function expects the match-data to be still in place!
   (catch 'exit
     (let* ((macro (reftex-match-string 10))
            (bom (match-beginning 10))
@@ -718,7 +718,7 @@
                                    context)
                  (when (and (not appendix)
                             (>= (string-to-char (match-string 2)) ?A))
-                   ;; Just entered the appendex.  Get out.
+                   ;; Just entered the appendix.  Get out.
                    (throw 'exit nil))
 
                  ;; Change the section number.
@@ -784,16 +784,18 @@
           pos cmd-list cmd cnt cnt-opt entry)
       (save-restriction
         (save-excursion
-          (narrow-to-region (max 1 bound) (point-max))
+          (narrow-to-region (max (point-min) bound) (point-max))
           ;; move back out of the current parenthesis
           (while (condition-case nil
-                     (progn (up-list -1) t)
+                     (let ((forward-sexp-function nil))
+                       (up-list -1) t)
                    (error nil))
             (setq cnt 1 cnt-opt 0)
             ;; move back over any touching sexps
             (while (and (reftex-move-to-previous-arg bound)
                         (condition-case nil
-                            (progn (backward-sexp) t)
+                            (let ((forward-sexp-function nil))
+                              (backward-sexp) t)
                           (error nil)))
               (if (eq (following-char) ?\[) (incf cnt-opt))
               (incf cnt))
@@ -974,15 +976,14 @@
             (if (re-search-forward "\\\\end{" nil t)
                 (match-beginning 0)
               (point-max))))))
-   ((or (= (preceding-char) ?\{)
-        (= (preceding-char) ?\[))
+   ((memq (preceding-char) '(?\{ ?\[))
     ;; Inside a list - get only the list.
     (buffer-substring-no-properties
      (point)
      (min (+ (point) 150)
           (point-max)
           (condition-case nil
-              (progn
+              (let ((forward-sexp-function nil)) ;Unneeded fanciness.
                 (up-list 1)
                 (1- (point)))
             (error (point-max))))))
@@ -1078,5 +1079,6 @@
               nrest (- nrest i))))
     string))
 
-;;; arch-tag: 6a8168f7-abb9-4576-99dc-fcbc7ba901a3
+(provide 'reftex-parse)
+
 ;;; reftex-parse.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]