changeset 37998:706af946b1e7

* reftex-ref.el (reftex-select-label-help): Added "z" key description. * reftex-sel.el (reftex-select-jump): New command. * reftex-toc.el (reftex-toc-help): Added "z" key description. (reftex-toc-jump): New command. * reftex-cite.el (reftex-parse-bibitem): Regexp changed to parse international characters as well. * reftex.el: Added autoloads for eftex-varioref-vref', eftex-fancyref-fref', eftex-fancyref-Fref' * reftex-vars.el: Protected single backslash in many docstrings. * reftex-dcr.el (reftex-view-crossref): added SPACE and TAB to the key separaotrs.
author Carsten Dominik <dominik@science.uva.nl>
date Fri, 08 Jun 2001 08:43:20 +0000
parents c329103798cc
children 8e7df927fd92
files lisp/textmodes/reftex-auc.el lisp/textmodes/reftex-cite.el lisp/textmodes/reftex-dcr.el lisp/textmodes/reftex-global.el lisp/textmodes/reftex-index.el lisp/textmodes/reftex-parse.el lisp/textmodes/reftex-ref.el lisp/textmodes/reftex-sel.el lisp/textmodes/reftex-toc.el lisp/textmodes/reftex-vars.el lisp/textmodes/reftex.el
diffstat 11 files changed, 57 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/reftex-auc.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-auc.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
--- a/lisp/textmodes/reftex-cite.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-cite.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
@@ -487,7 +487,7 @@
 (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
@@ -534,7 +534,7 @@
 
 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'.
--- a/lisp/textmodes/reftex-dcr.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-dcr.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
--- a/lisp/textmodes/reftex-global.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-global.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
--- a/lisp/textmodes/reftex-index.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-index.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
--- a/lisp/textmodes/reftex-parse.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-parse.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
--- a/lisp/textmodes/reftex-ref.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-ref.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
@@ -364,6 +364,7 @@
   " 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').
@@ -770,19 +771,19 @@
 	(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????
--- a/lisp/textmodes/reftex-sel.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-sel.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
@@ -445,6 +445,15 @@
   (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")
@@ -660,6 +669,7 @@
 
 (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)
--- a/lisp/textmodes/reftex-toc.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-toc.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
@@ -92,7 +92,8 @@
 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.
@@ -426,6 +427,16 @@
 	(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
@@ -576,6 +587,7 @@
 	("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))
--- a/lisp/textmodes/reftex-vars.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex-vars.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.15
+;; Version: 4.16
 ;;
 
 ;; This file is part of GNU Emacs.
@@ -348,7 +348,7 @@
     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
@@ -731,7 +731,7 @@
   "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)
@@ -788,7 +788,7 @@
   "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
@@ -832,11 +832,11 @@
   "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)
@@ -865,7 +865,7 @@
 (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."
@@ -1346,7 +1346,10 @@
 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")))))
--- a/lisp/textmodes/reftex.el	Thu Jun 07 16:01:50 2001 +0000
+++ b/lisp/textmodes/reftex.el	Fri Jun 08 08:43:20 2001 +0000
@@ -2,7 +2,7 @@
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 ;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version:    4.15
+;; Version:    4.16
 ;; Keywords:   tex
 
 ;; This file is part of GNU Emacs.
@@ -300,7 +300,7 @@
 ;;; Define the formal stuff for a minor mode named RefTeX.
 ;;;
 
-(defconst reftex-version "RefTeX version 4.15"
+(defconst reftex-version "RefTeX version 4.16"
   "Version string for RefTeX.")
 
 (defvar reftex-mode nil
@@ -1603,6 +1603,12 @@
  "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")