Commits

youngs  committed fff8f00

Sync with old tree.

  • Participants
  • Parent commits 4fc7900

Comments (0)

Files changed (15)

 Here are the more important changes made to RefTeX since initial release.
 Minor bug fixes are not mentioned.
 
+Version 4.16
+   - Minor updates and fixes.
+
 Version 4.14
    - Ensure write access to all files before doing global label replace.
    - Fixed bug which would parse \partial as \part.
+
+2001-06-08  Carsten Dominik  <dominik@astro.uva.nl>
+	
+	* reftex 4.16.
+
 2000-10-05  Martin Buchholz  <martin@xemacs.org>
 
 	* *: Mega typo fix.
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.22
-AUTHOR_VERSION = 4.14
+AUTHOR_VERSION = 4.16
 MAINTAINER = Carsten Dominik <dominik@astro.uva.nl>
 PACKAGE = reftex
 PKG_TYPE = regular
 REQUIRES = fsf-compat xemacs-base
-CATEGORY = standard
+CATEGORY = wp
 
 LISPFILES  = reftex-vars.el reftex.el reftex-auc.el reftex-cite.el\
              reftex-global.el reftex-parse.el reftex-ref.el\

File reftex-auc.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-cite.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
 (defun reftex-parse-bibitem (item)
   ;; Parse a \bibitem entry
   (let ((key "") (text ""))
-    (when (string-match "\\`{\\([^}]+\\)}\\([\001-\255]*\\)" item)
+    (when (string-match "\\`{\\([^}]+\\)}\\([^\000]*\\)" item)
       (setq key (match-string 1 item)
 	    text (match-string 2 item)))
     ;; Clean up the text a little bit
 
 When called with one or two `C-u' prefixes, first rescans the document.
 When called with a numeric prefix, make that many citations.  When
-called with point inside the braces of a `\cite' command, it will
+called with point inside the braces of a `\\cite' command, it will
 add another key, ignoring the value of `reftex-cite-format'.
 
 The regular expression uses an expanded syntax: && is interpreted as `and'.
 		item t))
 	 (reftex-default-bibliography
 	  (setq bibfile-list (reftex-default-bibliography)))
-	 (t (ding) (throw 'exit))))
+	 (t (ding) (throw 'exit nil))))
 
       (when no-revisit
 	(setq bibfile-list (reftex-visited-files bibfile-list)))

File reftex-dcr.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
 
 (defun reftex-view-crossref (&optional arg auto-how)
   "View cross reference of macro at point.  Point must be on the KEY
-argument.  When at at `\ref' macro, show corresponding `\label'
+argument.  When at at `\\ref' macro, show corresponding `\\label'
 definition, also in external documents (`xr').  When on a label, show
 a locations where KEY is referenced.  Subsequent calls find additional
-locations.  When on a `\cite', show the associated `\bibitem' macro or
-the BibTeX database entry.  When on a `\bibitem', show a `\cite' macro
-which uses this KEY. When on an `\index', show other locations marked
+locations.  When on a `\\cite', show the associated `\\bibitem' macro or
+the BibTeX database entry.  When on a `\\bibitem', show a `\\cite' macro
+which uses this KEY. When on an `\\index', show other locations marked
 by the same index entry.
 To define additional cross referencing items, use the option
 `reftex-view-crossref-extra'.  See also `reftex-view-crossref-from-bibtex'.
   (interactive "P")
   ;; See where we are.
   (let* ((macro (car (reftex-what-macro-safe 1)))
-         (key (reftex-this-word "^{}%\n\r,"))
+         (key (reftex-this-word "^{}%\n\r, \t"))
 	 dw)
 
     (if (or (null macro) (reftex-in-comment))

File reftex-global.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
          (files  (reftex-all-document-files))
          (cmd    (format "etags %s" (mapconcat 'identity files " "))))
     (save-excursion
-      (set-buffer (reftex-get-buffer-visiting master))
+      (set-buffer (reftex-get-file-buffer-force master))
       (message "Running etags to create TAGS file...")
       (shell-command cmd)
       (visit-tags-table "TAGS"))))

File reftex-index.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
 			 ((equal char ?\C-g)
 			  (keyboard-quit))
 			 ((member char '(?o ?O))
-			  ;; Select a different macro
+			  ;; Select a differnt macro
 			  (let* ((nc (reftex-index-select-phrases-macro 2))
 				 (macro-data 
 				  (cdr (assoc nc reftex-index-phrases-macro-data)))

File reftex-parse.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.

File reftex-ref.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
   " n / p      Go to next/previous label (Cursor motion works as well)
  C-c C-n/p  Go to next/previous section heading.
  b / l      Jump back to previous selection / Reuse last referenced label.
+ z          Jump to a specific section, e.g. '3 z' jumps to section 3.
  g / s      Update menu      / Switch label type.
  r / C-u r  Reparse document / Reparse entire document.
  x          Switch to label menu of external document (with LaTeX package `xr').
 	      selection-buffers)
       (reftex-kill-temporary-buffers))
     ;; Add the prefixes, put together the relevant information in the form
-    ;; (LABEL TYPEKEY SEPARATOR) and return a list of those.
+    ;; (LABEL TYPEKEY SEPERATOR) and return a list of those.
     (mapcar (lambda (x)
 	      (if (listp x)
 		  (list (concat prefix (car (car x)))
 	(setq buffer-read-only t))))))
 
 (defun reftex-varioref-vref ()
-  "Insert a reference using the `\vref' macro from the varioref package."
+  "Insert a reference using the `\\vref' macro from the varioref package."
   (interactive)
   (let ((reftex-format-ref-function 'reftex-format-vref))
     (reftex-reference)))
 (defun reftex-fancyref-fref ()
-  "Insert a reference using the `\fref' macro from the fancyref package."
+  "Insert a reference using the `\\fref' macro from the fancyref package."
   (interactive)
   (let ((reftex-format-ref-function 'reftex-format-fref)
 	;;(reftex-guess-label-type nil) ;FIXME do we want this????
 	)
     (reftex-reference)))
 (defun reftex-fancyref-Fref ()
-  "Insert a reference using the `\Fref' macro from the fancyref package."
+  "Insert a reference using the `\\Fref' macro from the fancyref package."
   (interactive)
   (let ((reftex-format-ref-function 'reftex-format-Fref)
 	;;(reftex-guess-label-type nil) ;FIXME do we want this????

File reftex-sel.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
   (interactive "p")
   (setq reftex-callback-fwd nil)
   (re-search-backward "^[^. \t\n\r]" nil t arg))
+(defun reftex-select-jump (arg)
+  "Jump to a specific section.  E.g. '3 z' jumps to section 3.
+Useful for large TOC's."
+  (interactive "P")
+  (goto-char (point-min))
+  (re-search-forward
+   (concat "^ *" (number-to-string (if (numberp arg) arg 1)) " ")
+   nil t)
+  (beginning-of-line))
 (defun reftex-select-next-heading (&optional arg)
   "Move to next table of contentes line."
   (interactive "p")
 
 (loop for x in
       '(("b"        . reftex-select-jump-to-previous)
+	("z"        . reftex-select-jump)
 	("v"        . reftex-select-toggle-varioref)
 	("V"        . reftex-select-toggle-fancyref)
 	("m"        . reftex-select-mark)

File reftex-toc.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
 f / g      Toggle follow mode on and off  / Refresh *toc* buffer.
 r / C-u r  Reparse the LaTeX document     / Reparse entire LaTeX document.
 .          In other window, show position from where `reftex-toc' was called.
-x          Switch to TOC of external document (with LaTeX package `xr').")
+x          Switch to TOC of external document (with LaTeX package `xr').
+z          Jump to a specific section (e.g. '3 z' goes to section 3")
 
 (defun reftex-toc (&optional rebuild)
   "Show the table of contents for the current document.
 	(message "")
       (message "Switched document"))))
 
+(defun reftex-toc-jump (arg)
+  "Jump to a specific section.  E.g. '3 z' jumps to section 3.
+Useful for large TOC's."
+  (interactive "P")
+  (goto-char (point-min))
+  (re-search-forward
+   (concat "^ *" (number-to-string (if (numberp arg) arg 1)) " ")
+   nil t)
+  (beginning-of-line))
+
 (defun reftex-toc-visit-location (&optional final no-revisit)
   ;; Visit the tex file corresponding to the toc entry on the current line.
   ;; If FINAL is t, stay there
 	("c"    . reftex-toc-toggle-context)
 	("%"    . reftex-toc-toggle-commented)
 	("x"    . reftex-toc-external)
+	("z"    . reftex-toc-jump)
 	("."    . reftex-toc-show-calling-point)
 	("\C-c\C-n" . reftex-toc-next-heading)
 	("\C-c\C-p" . reftex-toc-previous-heading))

File reftex-vars.el

 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.14
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
     cases in which different environments carry the same label type (like
     `equation' and `eqnarray').
     If the type indicator is nil and the macro has a label argument {*},
-    the macro defines neutral labels just like \label.  In this case
+    the macro defines neutral labels just like \\label.  In this case
     the reminder of this entry is ignored.
 
 LABEL-PREFIX
   "Function which produces the string to insert as a label definition.
 Normally should be nil, unless you want to do something fancy.
 The function will be called with two arguments, the LABEL and the DEFAULT
-FORMAT, which usually is `\label{%s}'.  The function should return the
+FORMAT, which usually is `\\label{%s}'.  The function should return the
 string to insert into the buffer."
   :group 'reftex-making-and-inserting-labels
   :type 'function)
   "Punctuation strings for multiple references.
 When marking is used in the selection buffer to select several references,
 this variable associates the 3 marking characters `,-+' with prefix strings
-to be inserted into the buffer before the corresponding \ref macro.
+to be inserted into the buffer before the corresponding \\ref macro.
 This is used to string together whole reference sets, like
 `eqs. 1,2,3-5,6 and 7' in a single call to `reftex-reference'. See manual."
   :group 'reftex-referencing-labels
   "Function which produces the string to insert as a reference.
 Normally should be nil, because the format to insert a reference can 
 already be specified in `reftex-label-alist'.
-This hook also is used by the special commands to insert `\vref' and `\fref'
+This hook also is used by the special commands to insert `\\vref' and `\\fref'
 references, so even if you set this, your setting will be ignored by
 the special commands.
 The function will be called with two arguments, the LABEL and the DEFAULT
-FORMAT, which normally is `~\ref{%s}'.  The function should return the
+FORMAT, which normally is `~\\ref{%s}'.  The function should return the
 string to insert into the buffer."
   :group 'reftex-referencing-labels
   :type 'function)
 (defcustom reftex-default-bibliography nil
   "*List of BibTeX database files which should be used if none are specified.
 When `reftex-citation' is called from a document which has neither a
-`\bibliography{..}' statement nor a `thebibliography' environment,
+`\\bibliography{..}' statement nor a `thebibliography' environment,
 RefTeX will scan these files instead.  Intended for using `reftex-citation'
 in non-LaTeX files.  The files will be searched along the BIBINPUTS or TEXBIB
 path."
 OTHER-EXT:  Any number of other legal extensions for this file type.
 
 When a files is searched and it does not have any of the legal extensions,
-we try the default extension first, and then the naked file name."
+we try the default extension first, and then the naked file name.
+
+If you are using AUCTeX, you also need to add new extensions to
+TeX-file-extensions."
   :group 'reftex-finding-files
   :type '(repeat (cons (string :tag "File type")
 		       (repeat (string :tag "Extension")))))
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version:    4.14
+;; Version:    4.16
 ;; Keywords:   tex
 
 ;; This file is part of GNU Emacs.
 ;;; Define the formal stuff for a minor mode named RefTeX.
 ;;;
 
-(defconst reftex-version "RefTeX version 4.14"
+(defconst reftex-version "RefTeX version 4.16"
   "Version string for RefTeX.")
 
 (defvar reftex-mode nil
 ;;; =========================================================================
 ;;;
 ;;; Silence warnings about variables in other packages.
-(defvar TeX-master)
-(defvar LaTeX-section-hook)
-(defvar LaTeX-label-function)
-(defvar tex-main-file)
-(defvar outline-minor-mode)
-(defvar font-lock-mode)
-(defvar font-lock-fontify-region-function)
-(defvar font-lock-syntactic-keywords)
+(eval-when-compile
+  (defvar TeX-master)
+  (defvar LaTeX-section-hook)
+  (defvar LaTeX-label-function)
+  (defvar tex-main-file)
+  (defvar outline-minor-mode)
+  (defvar font-lock-mode)
+  (defvar font-lock-fontify-region-function)
+  (defvar font-lock-syntactic-keywords))
 
 ;;; =========================================================================
 ;;;
 	  (condition-case nil 
 	      (TeX-master-file t)
 	    (error (buffer-file-name))))
+	 ((fboundp 'tex-main-file) (tex-main-file)) ; Emacs LaTeX mode
          ((boundp 'TeX-master)       ; The variable is defined - lets use it.
           (cond
            ((eq TeX-master t)
     ;; Scan whatever was required by the caller.
     (reftex-do-parse rescan file))))
 
+(defun reftex-scanning-info-available-p ()
+  "Is the scanning info about the current document available?"
+  (unless reftex-docstruct-symbol
+    (reftex-tie-multifile-symbols))
+  (and (symbolp reftex-docstruct-symbol)
+       (symbol-value reftex-docstruct-symbol)
+       t))
+  
 (defun reftex-silence-toc-markers (list n)
   ;; Set all toc markers in the first N entries in list to nil
   (while (and list (> (decf n) -1))
  "Insert a unique label." t)
 (autoload 'reftex-reference "reftex-ref"
  "Make a LaTeX reference." t)
+(autoload 'reftex-varioref-vref "reftex-ref"
+  "Make a varioref reference." t)
+(autoload 'reftex-fancyref-fref "reftex-ref"
+  "Make a fancyref \\fref reference." t)
+(autoload 'reftex-fancyref-Fref "reftex-ref"
+  "Make a fancyref \\Fref reference." t)
 (autoload 'reftex-show-label-location "reftex-ref")
 (autoload 'reftex-query-label-type "reftex-ref")
 
 @c %**start of header
 @setfilename reftex
 @settitle RefTeX User Manual
-@dircategory Editors
+@dircategory Emacs
 @direntry
 * RefTeX: (reftex).	Emacs support for LaTeX cross-references and citations.
 @end direntry
 @synindex ky cp
 @syncodeindex vr cp
 @syncodeindex fn cp
-@set VERSION 4.12
-@set EDITION 4.12
-@set DATE March 2000
+@set VERSION 4.16
+@set EDITION 4.16
+@set DATE June 2001
 @set AUTHOR Carsten Dominik
 @set AUTHOR-EMAIL dominik@@astro.uva.nl
 @set MAINTAINER Carsten Dominik
 This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for
 @b{Ref@TeX{}} @value{VERSION}@refill
 
-Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim
-copies of this manual provided the copyright notice and
-this permission notice are preserved on all copies.
-     
-@ignore
-Permission is granted to process this file through TeX
-and print the results, provided the printed document
-carries a copying permission notice identical to this
-one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
-     
-@end ignore
-Permission is granted to copy and distribute modified
-versions of this manual under the conditions for
-verbatim copying, provided that the entire resulting
-derive work is distributed under the terms of a permission
-notice identical to this one.
-     
-Permission is granted to copy and distribute
-translations of this manual into another language,
-under the above conditions for modified versions,
-except that this permission notice may be stated in a
-translation approved by the Free Software Foundation.
+Copyright (c) 1997, 1998, 1999, 2000 2001 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU
+Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
+license is included in the section entitled ``GNU Free Documentation
+License'' in the Emacs manual.
+
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
+
+This document is part of a collection distributed under the GNU Free
+Documentation License.  If you want to distribute this document
+separately from the collection, you can do so by adding a copy of the
+license to the document, as described in section 6 of the license.
 @end ifinfo
 
 @titlepage
 
 @author by Carsten Dominik
 @page
-Copyright @copyright{} 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+Copyright @copyright{} 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 @sp 2
 This is edition @value{EDITION} of the @cite{Ref@TeX{} User Manual} for
 
 @sp 2
 
-Permission is granted to make and distribute verbatim
-copies of this manual provided the copyright notice and
-this permission notice are preserved on all copies.
-     
-Permission is granted to copy and distribute modified
-versions of this manual under the conditions for
-verbatim copying, provided that the entire resulting
-derive work is distributed under the terms of a permission
-notice identical to this one.
-     
-Permission is granted to copy and distribute
-translations of this manual into another language,
-under the above conditions for modified versions,
-except that this permission notice may be stated in a
-translation approved by the Free Software Foundation.
-
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU
+Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
+license is included in the section entitled ``GNU Free Documentation
+License'' in the Emacs manual.
+
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this GNU Manual, like GNU software.  Copies published by the Free
+Software Foundation raise funds for GNU development.''
+
+This document is part of a collection distributed under the GNU Free
+Documentation License.  If you want to distribute this document
+separately from the collection, you can do so by adding a copy of the
+license to the document, as described in section 6 of the license.
 @end titlepage
 @page
 
 @item C-c C-p
 Goto previous section heading.
 
+@item N z
+Jump to section N, using the prefix arg.  For example, @kbd{3 z} jumps
+to section 3.@refill
+
 @tablesubheading{Access to document locations}
 @item @key{SPC}
 Show the corresponding location in another window.  This command does
 @item C-c C-p
 Goto previous section heading.
 
+@item N z
+Jump to section N, using the prefix arg.  For example @kbd{3 z} jumps to 
+section 3.@refill
+
 @tablesubheading{Displaying Context}
 @item @key{SPC}
 Show the surroundings of the definition of the current label in another
 @code{reftex-index-macros} will be recognized.@refill
 @end table
 
-@vindex reftex-view-crossref-macros
+@vindex reftex-view-crossref-extra
 While the display of cross referencing information for the above
 mentioned macros is hard--coded, you can configure additional relations
-in the variable @code{reftex-view-crossref-macros}.
+in the variable @code{reftex-view-crossref-extra}.
     
 @iftex
 @chapter All the Rest
 @lisp
 (setq reftex-use-external-file-finders t)
 (setq reftex-external-file-finders
-      '(("tex" "kpsewhich -format=.tex %f")
-        ("bib" "kpsewhich -format=.bib %f")))      
+      '(("tex" . "kpsewhich -format=.tex %f")
+        ("bib" . "kpsewhich -format=.bib %f")))      
 @end lisp
 @end itemize
 
 Thanks to the people on the Net who have used @b{Ref@TeX{}} and helped
 developing it with their reports.  In particular thanks to @i{Fran
 Burstall, Alastair Burt, Soren Dayton, Stephen Eglen, Karl Eichwalder,
-Peter Galbraith, Kai Grossjohann, Frank Harrell, Dieter Kraft, Adrian
-Lanz, Rory Molinari, Stefan Monnier, Laurent Mugnier, Sudeep Kumar
-Palat, Daniel Polani, Robin Socha, Richard Stanton, Allan Strand, Jan
-Vroonhof, Christoph Wedler, Alan Williams}.@refill
+Erik Frik, Peter Galbraith, Kai Grossjohann, Frank Harrell, Dieter
+Kraft, Adrian Lanz, Rory Molinari, Stefan Monnier, Laurent Mugnier,
+Sudeep Kumar Palat, Daniel Polani, Robin Socha, Richard Stanton, Allan
+Strand, Jan Vroonhof, Christoph Wedler, Alan Williams}.@refill
 
 The @code{view-crossref} feature was inspired by @i{Peter Galbraith's}
 @file{bib-cite.el}.@refill
 @item
 Support for @file{bibentry} citation style.
 @end itemize
+@noindent @b{Version 4.15}
+@itemize @bullet
+@item
+Small bug fixes.
+@item
+Improved interaction with Emacs LaTeX mode.
+@end itemize
 
 @node Index,  , , Top
 @unnumbered Index