Commits

Anonymous committed e59a49d

2002-07-24 Carsten Dominik <dominik@science.uva.nl>

* Update to RefTeX 4.18.

Message-ID: <15678.25534.565124.955203@sand.science.uva.nl>

  • Participants
  • Parent commits 2cbe07f

Comments (0)

Files changed (15)

-This is the CHANGES file of the RefTeX distribution, version 4.11 
+This is the CHANGES file of the RefTeX distribution, version VERSIONTAG 
 
 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.18
+   - `reftex-citation' uses the word before the cursor as a default
+     search string.
+   - simplified several regular expressions for speed.
+
+Version 4.17
+   - The toc window can be split off horizontally.  See new options
+     `reftex-toc-split-windows-horizontally',
+     `reftex-toc-split-windows-horizontally-fraction'.
+   - It is possible to specify a function which verifies an index match
+     during global indexing.  See new option
+     `reftex-index-verify-function'.
+   - The macros which input a file in LaTeX (like \input, \include) can
+     be configured.  See new option `reftex-include-file-commands'.
+   - The macros which specify the bibliography file (like
+     \bibliography) can be configured.  See new option
+     `reftex-bibliography-commands'.
+   - The regular expression used to search for the \bibliography macro
+     has been relaxed to allow for `{\bibliography{...}}' needed by
+     chapterbib.
+   - Small bug fixes.
+
+Version 4.15
+   - Bug fix in reftex-create-tags-file.
+   - Better interaction with Emacs LaTeX mode.
 
 Version 4.14
    - Ensure write access to all files before doing global label replace.
+2002-07-24  Carsten Dominik  <dominik@science.uva.nl>
+
+	* Update to RefTeX 4.18.
+
 2002-07-16  Adrian Aichner  <adrian@xemacs.org>
 
 	* .cvsignore: Add generated .info* and .html files.
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.25
-AUTHOR_VERSION = 4.16
-MAINTAINER = Carsten Dominik <dominik@astro.uva.nl>
+AUTHOR_VERSION = 4.18
+MAINTAINER = Carsten Dominik <dominik@science.uva.nl>
 PACKAGE = reftex
 PKG_TYPE = regular
 REQUIRES = fsf-compat xemacs-base

File reftex-auc.el

-;;; reftex-auc.el - RefTeX's interface to AUC TeX
+;;; reftex-auc.el --- RefTeX's interface to AUC TeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-auc)
 (require 'reftex)

File reftex-cite.el

-;;; reftex-cite.el - Creating citations with RefTeX
+;;; reftex-cite.el --- creating citations with RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-cite)
 (require 'reftex)
 
 ;; Find bibtex files
 
+
+(defmacro reftex-with-special-syntax-for-bib (&rest body)
+  `(let ((saved-syntax (syntax-table)))
+     (unwind-protect
+	 (progn
+	   (set-syntax-table reftex-syntax-table-for-bib)
+	   ,@body)
+       (set-syntax-table saved-syntax))))
+
 (defun reftex-default-bibliography ()
   ;; Return the expanded value of `reftex-default-bibliography'.
   ;; The expanded value is cached.
   (let* (re-list first-re rest-re
                  (buffer-list (if (listp buffers) buffers (list buffers)))
                  found-list entry buffer1 buffer alist
-                 key-point start-point end-point)
+                 key-point start-point end-point default)
 
     ;; Read a regexp, completing on known citation keys.
+    (setq default (regexp-quote (reftex-get-bibkey-default)))
     (setq re-list 
 	  (split-string 
 	   (completing-read 
-	    "RegExp [ && RegExp...]: "
+	    (concat
+	     "Regex { && Regex...}: "
+	     "[" default "]: ")
 	    (if reftex-mode
 		(if (fboundp 'LaTeX-bibitem-list)
 		    (LaTeX-bibitem-list)
 	    nil nil nil 'reftex-cite-regexp-hist)
 	   "[ \t]*&&[ \t]*"))
 
+    (if (or (null re-list ) (equal re-list '("")))
+	(setq re-list (list default)))
+
     (setq first-re (car re-list)    ; We'll use the first re to find things,
           rest-re  (cdr re-list))   ; the others to narrow down.
     (if (string-match "\\`[ \t]*\\'" (or first-re ""))
             (message "Scanning bibliography database %s" buffer1))
 
           (set-buffer buffer1)
-          (save-excursion
-            (goto-char (point-min))
-            (while (re-search-forward first-re nil t)
-              (catch 'search-again
-                (setq key-point (point))
-                (unless (re-search-backward
-                         "\\(\\`\\|[\n\r]\\)[ \t]*@\\([a-zA-Z]+\\)[ \t\n\r]*[{(]" nil t)
-                  (throw 'search-again nil))
-                (setq start-point (point))
-                (goto-char (match-end 0))
-                (condition-case nil
-                    (up-list 1)
-                  (error (goto-char key-point)
+	  (reftex-with-special-syntax-for-bib
+	   (save-excursion
+	     (goto-char (point-min))
+	     (while (re-search-forward first-re nil t)
+	       (catch 'search-again
+		 (setq key-point (point))
+		 (unless (re-search-backward
+			  "\\(\\`\\|[\n\r]\\)[ \t]*@\\([a-zA-Z]+\\)[ \t\n\r]*[{(]" nil t)
+		   (throw 'search-again nil))
+		 (setq start-point (point))
+		 (goto-char (match-end 0))
+		 (condition-case nil
+		     (up-list 1)
+		   (error (goto-char key-point)
                           (throw 'search-again nil)))
-                (setq end-point (point))
-
-                ;; Ignore @string, @comment and @c entries or things
-                ;; outside entries
-                (when (or (string= (downcase (match-string 2)) "string")
-                          (string= (downcase (match-string 2)) "comment")
-                          (string= (downcase (match-string 2)) "c")
-                          (< (point) key-point)) ; this means match not in {}
-                  (goto-char key-point)
-                  (throw 'search-again nil))
-
-                ;; Well, we have got a match
-                (setq entry (concat
-                             (buffer-substring start-point (point)) "\n"))
-
-                ;; Check if other regexp match as well
-                (setq re-list rest-re)
-                (while re-list
-                  (unless (string-match (car re-list) entry)
-                    ;; nope - move on
-                    (throw 'search-again nil))
-                  (pop re-list))
-
-                (setq alist (reftex-parse-bibtex-entry
-                             nil start-point end-point))
-                (push (cons "&entry" entry) alist)
-
-                ;; check for crossref entries
-                (if (assoc "crossref" alist)
-                    (setq alist
-                          (append
-                           alist (reftex-get-crossref-alist alist))))
-
-                ;; format the entry
-                (push (cons "&formatted" (reftex-format-bib-entry alist))
-                      alist)
-
-		;; make key the first element
-		(push (reftex-get-bib-field "&key" alist) alist)
-
-                ;; add it to the list
-                (push alist found-list))))
-          (reftex-kill-temporary-buffers))))
+		 (setq end-point (point))
+		 
+		 ;; Ignore @string, @comment and @c entries or things
+		 ;; outside entries
+		 (when (or (string= (downcase (match-string 2)) "string")
+			   (string= (downcase (match-string 2)) "comment")
+			   (string= (downcase (match-string 2)) "c")
+			   (< (point) key-point)) ; this means match not in {}
+		   (goto-char key-point)
+		   (throw 'search-again nil))
+		 
+		 ;; Well, we have got a match
+		 (setq entry (concat
+			      (buffer-substring start-point (point)) "\n"))
+		 
+		 ;; Check if other regexp match as well
+		 (setq re-list rest-re)
+		 (while re-list
+		   (unless (string-match (car re-list) entry)
+		     ;; nope - move on
+		     (throw 'search-again nil))
+		   (pop re-list))
+		 
+		 (setq alist (reftex-parse-bibtex-entry
+			      nil start-point end-point))
+		 (push (cons "&entry" entry) alist)
+		 
+		 ;; check for crossref entries
+		 (if (assoc "crossref" alist)
+		     (setq alist
+			   (append
+			    alist (reftex-get-crossref-alist alist))))
+		 
+		 ;; format the entry
+		 (push (cons "&formatted" (reftex-format-bib-entry alist))
+		       alist)
+		 
+		 ;; make key the first element
+		 (push (reftex-get-bib-field "&key" alist) alist)
+		 
+		 ;; add it to the list
+		 (push alist found-list)))))
+	  (reftex-kill-temporary-buffers))))
     (setq found-list (nreverse found-list))
 
     ;; Sorting
               (reftex-parse-bibtex-entry nil start (point)))
           nil)))))
 
-;; Parse the thebibliography environment
+;; Parse the bibliography environment
 (defun reftex-extract-bib-entries-from-thebibliography (files)
   ;; Extract bib-entries from the \begin{thebibliography} environment.
   ;; Parsing is not as good as for the BibTeX database stuff.
   ;; The environment should be located in file FILE.
 
-  (let* (start end buf entries re re-list file)
+  (let* (start end buf entries re re-list file default)
     (unless files
       (error "Need file name to find thebibliography environment"))
     (while (setq file (pop files))
     (unless entries
       (error "No bibitems found"))
 
-    (setq re-list (split-string 
-		   (read-string "RegExp [ && RegExp...]: "
-				nil 'reftex-cite-regexp-hist)
-		   "[ \t]*&&[ \t]*"))
+    ;; Read a regexp, completing on known citation keys.
+    (setq default (regexp-quote (reftex-get-bibkey-default)))
+    (setq re-list 
+	  (split-string 
+	   (completing-read 
+	    (concat
+	     "Regex { && Regex...}: "
+	     "[" default "]: ")
+	    (if reftex-mode
+		(if (fboundp 'LaTeX-bibitem-list)
+		    (LaTeX-bibitem-list)
+		  (cdr (assoc 'bibview-cache 
+			      (symbol-value reftex-docstruct-symbol))))
+	      nil)
+	    nil nil nil 'reftex-cite-regexp-hist)
+	   "[ \t]*&&[ \t]*"))
+
+    (if (or (null re-list ) (equal re-list '("")))
+	(setq re-list (list default)))
+
     (if (string-match "\\`[ \t]*\\'" (car re-list))
         (error "Empty regular expression"))
 
 
     entries))
 
+(defun reftex-get-bibkey-default ()
+  ;; Return the word before the cursor.  If the cursor is in a
+  ;; citation macro, return the word before the macro.
+  (let* ((macro (reftex-what-macro 1)))
+    (save-excursion
+      (if (and macro (string-match "cite" (car macro)))
+	  (goto-char (cdr macro)))
+      (skip-chars-backward "^a-zA-Z0-9")
+      (reftex-this-word))))
+
 ;; Parse and format individual entries
 
 (defun reftex-get-bib-names (field entry)
             (progn
               (set-buffer (get-buffer-create " *RefTeX-scratch*"))
               (fundamental-mode)
+	      (set-syntax-table reftex-syntax-table-for-bib)
               (erase-buffer)
               (insert entry))
           (widen)
   "Make a citation using BibTeX database files.
 After prompting for a regular expression, scans the buffers with
 bibtex entries (taken from the \\bibliography command) and offers the
-matching entries for selection.  The selected entry is formated according
+matching entries for selection.  The selected entry is formatted according
 to `reftex-cite-format' and inserted into the buffer.
 
 If NO-INSERT is non-nil, nothing is inserted, only the selected key returned.
 
 (defun reftex-format-names (namelist n)
   (let (last (len (length namelist)))
+    (if (= n 0) (setq n len))
     (cond
      ((< len 1) "")
      ((= 1 len) (car namelist))

File reftex-dcr.el

-;;; reftex-dcr.el - Viewing cross references and citations with RefTeX
+;;; reftex-dcr.el --- viewing cross references and citations with RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 ;;
 
 ;; This file is part of GNU Emacs.
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-dcr)
 (provide 'reftex-vcr)

File reftex-global.el

-;;; reftex-global.el - Operations on entire documents with RefTeX
+;;; reftex-global.el --- operations on entire documents with RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-global)
 (require 'reftex)
     (tags-search regexp (list 'reftex-all-document-files))))
 
 (defun reftex-query-replace-document (&optional from to delimited)
-  "Run a query-replace-regexp of FROM with TO over the entire document.
+  "Do `query-replace-regexp' of FROM with TO over the entire document.
 Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit] or ESC), you can resume the query replace
+If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
 with the command \\[tags-loop-continue].
 No active TAGS table is required."
   (interactive)
       (message "Document does not contain duplicate labels."))))
 
 (defun reftex-change-label (&optional from to)
-  "Query replace FROM with TO in all \\label and \\ref commands.
+  "Run `query-replace-regexp' of FROM with TO in all \\label and \\ref commands.
 Works on the entire multifile document.
-If you exit (\\[keyboard-quit] or ESC), you can resume the query replace
+If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
 with the command \\[tags-loop-continue].
 No active TAGS table is required."
   (interactive)

File reftex-index.el

-;;; reftex-index.el - Index support with RefTeX
+;;; reftex-index.el --- index support with RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-index)
 (require 'reftex)
 e / C-k    Edit/Kill the entry.
 * | @      Edit specific part of entry: [*]key [|]attribute [@]visual
            With prefix: kill that part.
-( )        Toggle entry's beginning/end of page range property.
+\( )        Toggle entry's beginning/end of page range property.
 _ ^        Add/Remove parent key (to make this item a subitem).
 } / {      Restrict Index to a single document section / Widen.
 < / >      When restricted, move restriction to previous/next section.")
     (unwind-protect
 	(while (re-search-forward re nil t)
 	  (catch 'next-match
+	    (if (and (fboundp reftex-index-verify-function)
+		     (not (funcall reftex-index-verify-function)))
+		(throw 'next-match nil))
 	    (setq match (match-string 0))
 	    (setq mathp
 		  (save-match-data

File reftex-parse.el

-;;; reftex-parse.el - Parser Functions for RefTeX
+;;; reftex-parse.el --- parser functions for RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 ;;
 
 ;; This file is part of GNU Emacs.
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-parse)
 (require 'reftex)
     (save-excursion
       (goto-char (point-min))
       (if (re-search-forward
-	   "\\(\\`\\|[\n\r]\\)[ \t]*\\\\\\(no\\)?bibliography{[ \t]*\\([^}]+\\)" nil t)
+	   (concat
+;	    "\\(\\`\\|[\n\r]\\)[^%]*\\\\\\("
+	    "\\(^\\)[^%]*\\\\\\("
+	    (mapconcat 'identity reftex-bibliography-commands "\\|")
+	    "\\){[ \t]*\\([^}]+\\)") nil t)
 	  (setq files 
 		(split-string (reftex-match-string 3)
 			      "[ \t\n\r]*,[ \t\n\r]*")))))

File reftex-ref.el

-;;; reftex-ref.el - Code to create labels and references with RefTeX
+;;; reftex-ref.el --- code to create labels and references with RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-ref)
 (require 'reftex)
 	      selection-buffers)
       (reftex-kill-temporary-buffers))
     ;; Add the prefixes, put together the relevant information in the form
-    ;; (LABEL TYPEKEY SEPERATOR) and return a list of those.
+    ;; (LABEL TYPEKEY SEPARATOR) and return a list of those.
     (mapcar (lambda (x)
 	      (if (listp x)
 		  (list (concat prefix (car (car x)))

File reftex-sel.el

-;;; reftex-sel.el - The selection modes for RefTeX
+;;; reftex-sel.el --- the selection modes for RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-sel)
 (require 'reftex)

File reftex-toc.el

-;;; reftex-toc.el - RefTeX's table of contents mode
+;;; reftex-toc.el --- RefTeX's table of contents mode
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-toc)
 (require 'reftex)
   "Stores the file name from which `reftex-toc' was called.  For redo command.")
 
 (defvar reftex-last-window-height nil)
+(defvar reftex-last-window-width nil)
 (defvar reftex-toc-include-labels-indicator nil)
 (defvar reftex-toc-include-index-indicator nil)
 (defvar reftex-toc-max-level-indicator nil)
 	 (docstruct-symbol reftex-docstruct-symbol)
 	 (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol)))
 	 (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data)))
-	 (here-I-am (if rebuild 
+	 (here-I-am (if rebuild
 			(get 'reftex-toc :reftex-data)
 		      (car (reftex-where-am-I))))
 	 offset)
       (when (or (not reftex-toc-keep-other-windows)
 		(< (window-height) (* 2 window-min-height)))
 	(delete-other-windows))
-      (setq reftex-last-window-height (window-height))  ; remember
-      (split-window)
+
+      (setq reftex-last-window-width (window-width)
+	    reftex-last-window-height (window-height))  ; remember
+      (if reftex-toc-split-windows-horizontally
+	  (split-window-horizontally
+	   (floor (* (frame-width) reftex-toc-split-windows-horizontally-fraction)))
+	(split-window))
+
       (let ((default-major-mode 'reftex-toc-mode))
 	(switch-to-buffer "*toc*")))
 
 
 (defun reftex-re-enlarge ()
   ;; Enlarge windiw to a remembered size
-  (enlarge-window
-   (max 0 (- (or reftex-last-window-height (window-height))
-	     (window-height)))))
+  (if reftex-toc-split-windows-horizontally
+      (enlarge-window-horizontally
+       (max 0 (- (or reftex-last-window-width (window-width))
+		 (window-width))))
+    (enlarge-window
+     (max 0 (- (or reftex-last-window-height (window-height))
+	       (window-height))))))
 
 (defun reftex-toc-show-help ()
   "Show a summary of special key bindings."

File reftex-vars.el

-;;; reftex-vars.el - Configuration variables for RefTeX
+;;; reftex-vars.el --- configuration variables for RefTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version: 4.16
-;;
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
 
 ;; This file is part of GNU Emacs.
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 (provide 'reftex-vars)
 
       (?s    . "\\citep[see][]{%l}")
       (?a    . "\\citeauthor{%l}")
       (?A    . "\\citeauthor*{%l}")
-      (?y    . "\\citeyear{%l}")))
+      (?y    . "\\citeyear{%l}")
+      (?n    . "\\nocite{%l}")))
     (bibentry "The Bibentry package"
       "\\bibentry{%l}")
     (harvard "The Harvard package"
   :prefix "reftex-"
   :group 'tex)
 
+
 ;; Table of contents configuration --------------------------------------
 
 (defgroup reftex-table-of-contents-browser nil
   "A multifile table of contents browser."
   :group 'reftex)
 
+(defcustom reftex-include-file-commands '("include" "input")
+  "LaTeX commands which input another file.
+The file name is expected after the command, either in braces or separated
+by whitespace."
+  :group 'reftex-table-of-contents-browser
+  :type '(repeat string))
+
+(defcustom reftex-max-section-depth 12
+  "Maximum depth of section levels in document structure.
+Standard LaTeX needs default is 7, but there are packages for which this
+needs to be larger."
+  :group 'reftex-table-of-contents-browser
+  :type 'integer)
+
+;; LaTeX section commands and level numbers
+(defcustom reftex-section-levels
+  '(
+    ("part"            .  0)
+    ("chapter"         .  1)
+    ("section"         .  2)
+    ("subsection"      .  3)
+    ("subsubsection"   .  4)
+    ("paragraph"       .  5)
+    ("subparagraph"    .  6)
+    ("subsubparagraph" .  7)
+    ("addchap"         . -1) ; KOMA-Script
+    ("addsec"          . -2) ; KOMA-Script
+;;; ("minisec"         . -7) ; KOMA-Script
+    )
+  "Commands and levels used for defining sections in the document.
+This is an alist with each element like (COMMAND-NAME . LEVEL).
+The car of each cons cell is the name of the section macro (without
+the backslash).  The cdr is a number indicating its level.  A negative
+level means the same level as the positive value, but the section will
+never get a number.  The cdr may also be a function which will be called
+to after the section-re matched to determine the level."
+  :group 'reftex-table-of-contents-browser
+  :set 'reftex-set-dirty
+  :type '(repeat
+          (cons (string :tag "sectioning macro" "")
+		(choice
+		 (number :tag "level           " 0)
+		 (symbol :tag "function        " my-level-func)))))
+
 (defcustom reftex-toc-max-level 100
   "*The maximum level of toc entries which will be included in the TOC.
 Section headings with a bigger level will be ignored.  In RefTeX, chapters
   :group 'reftex-table-of-contents-browser
   :type 'integer)
 
+(defcustom reftex-toc-split-windows-horizontally nil
+  "*Non-nil means, create TOC window by splitting window horizontally."
+  :group 'reftex-table-of-contents-browser
+  :type 'boolean)
+
+(defcustom reftex-toc-split-windows-horizontally-fraction .5
+  "*Fraction of the horizontal width of the frame to be used for TOC window.
+Only relevant when `reftex-toc-split-windows-horizontally' is non-nil."
+  :group 'reftex-table-of-contents-browser
+  :type 'number)
+
 (defcustom reftex-toc-keep-other-windows t
   "*Non-nil means, split the selected window to display the *toc* buffer.
 This helps to keep the window configuration, but makes the *toc* small.
     which contains all labels.
 
     This may also be a function to do local parsing and identify point
-    to be in a a non-standard label environment.  The function must take
+    to be in a non-standard label environment.  The function must take
     an argument BOUND and limit backward searches to this value.  It
     should return either nil or a cons cell (FUNCTION . POSITION) with
     the function symbol and the position where the special environment
 		 (nth 0 x)))
 	 reftex-label-alist-builtin)))))
 
-(defcustom reftex-max-section-depth 12
-  "Maximum depth of section levels in document structure.
-Standard LaTeX needs default is 7, but there are packages for which this
-needs to be larger."
-  :group 'reftex-defining-label-environments
-  :type 'integer)
-
-;; LaTeX section commands and level numbers
-(defcustom reftex-section-levels
-  '(
-    ("part"            .  0)
-    ("chapter"         .  1)
-    ("section"         .  2)
-    ("subsection"      .  3)
-    ("subsubsection"   .  4)
-    ("paragraph"       .  5)
-    ("subparagraph"    .  6)
-    ("subsubparagraph" .  7)
-    ("addchap"         . -1) ; KOMA-Script
-    ("addsec"          . -2) ; KOMA-Script
-;;; ("minisec"         . -7) ; KOMA-Script
-    )
-  "Commands and levels used for defining sections in the document.
-This is an alist with each element like (COMMAND-NAME . LEVEL).
-The car of each cons cell is the name of the section macro (without
-the backslash).  The cdr is a number indicating its level.  A negative
-level means the same level as the positive value, but the section will
-never get a number.  The cdr may also be a function which will be called
-to after the section-re matched to determine the level."
-  :group 'reftex-defining-label-environments
-  :set 'reftex-set-dirty
-  :type '(repeat
-          (cons (string :tag "sectioning macro" "")
-		(choice
-		 (number :tag "level           " 0)
-		 (symbol :tag "function        " my-level-func)))))
-
 (defcustom reftex-section-prefixes '((0 . "part:") (1 . "cha:") (t . "sec:"))
   "Prefixes for section labels.
 When the label prefix given in an entry in `reftex-label-alist' contains `%S',
   "Support for referencing bibliographic data with BibTeX."
   :group 'reftex)
 
+(defcustom reftex-bibliography-commands '("bibliography" "nobibliography")
+  "LaTeX commands which specify the BibTeX databases to use with the document."
+  :group 'reftex-citation-support
+  :type '(repeat string))
+
+
 (defvar reftex-bibfile-ignore-list nil) ; compatibility
 (defcustom reftex-bibfile-ignore-regexps nil
   "*List of regular expressions to exclude files in \\bibliography{..}.
 In the format, the following percent escapes will be expanded.
 
 %l   The BibTeX label of the citation.
-%a   List of author names, see also `reftex-cite-punctuation.
+%a   List of author names, see also `reftex-cite-punctuation'.
 %2a  Like %a, but abbreviate more than 2 authors like Jones et al.
 %A   First author name only.
 %e   Works like %a, but on list of editor names. (%2e and %E work a well)
   :group 'reftex-index-support
   :type 'boolean)
 
+(defcustom reftex-index-verify-function nil
+  "A function which is called  at each match during global indexing.
+If the function returns nil, the current match is skipped."
+  :group 'reftex-index-support
+  :type '(choice
+	  (const :tag "No verification" nil)
+	  (function)))
+
 (defcustom reftex-index-phrases-skip-indexed-matches nil
   "*Non-nil means, skip matches which appear to be indexed already.
 When doing global indexing from the phrases buffer, searches for some
-;;; reftex.el --- Minor mode for doing \label, \ref, \cite, \index in LaTeX
+;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX
 ;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
-;; Author:     Carsten Dominik <dominik@strw.LeidenUniv.nl>
-;; Version:    4.16
-;; Keywords:   tex
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: 4.18
+;; 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.16"
+(defconst reftex-version "RefTeX version 4.18"
   "Version string for RefTeX.")
 
 (defvar reftex-mode nil
 
 (defvar reftex-mode-menu nil)
 (defvar reftex-syntax-table nil)
+(defvar reftex-syntax-table-for-bib nil)
 
 (defvar reftex-auto-view-crossref-timer nil
   "The timer used for auto-view-crossref.")
 	  (setq reftex-syntax-table (copy-syntax-table (syntax-table)))
 	  (modify-syntax-entry ?\( "." reftex-syntax-table)
 	  (modify-syntax-entry ?\) "." reftex-syntax-table))
+	(unless reftex-syntax-table-for-bib
+	  (setq reftex-syntax-table-for-bib (copy-syntax-table reftex-syntax-table))
+	  (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib)
+	  (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib)
+	  (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib)
+	  (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib))
         (run-hooks 'reftex-mode-hook))
     ;; Mode was turned off
     (easy-menu-remove reftex-mode-menu)))
 ;; The following constants are derived from `reftex-label-alist'.
 
 ;; Prompt used for label type queries directed to the user.
-(defconst reftex-type-query-prompt nil)
+(defvar reftex-type-query-prompt nil)
 
 ;; Help string for label type queries.
-(defconst reftex-type-query-help nil)
+(defvar reftex-type-query-help nil)
 
 ;; Alist relating label type to reference format.
-(defconst reftex-typekey-to-format-alist nil)
+(defvar reftex-typekey-to-format-alist nil)
 
 ;; Alist relating label type to label prefix.
-(defconst reftex-typekey-to-prefix-alist nil)
+(defvar reftex-typekey-to-prefix-alist nil)
 
 ;; Alist relating environments or macros to label type and context regexp.
-(defconst reftex-env-or-mac-alist nil)
+(defvar reftex-env-or-mac-alist nil)
 
 ;; List of special environment parser functions
-(defconst reftex-special-env-parsers nil)
+(defvar reftex-special-env-parsers nil)
 
 ;; List of macros carrying a label.
-(defconst reftex-label-mac-list nil)
+(defvar reftex-label-mac-list nil)
 
 ;; List of environments carrying a label.
-(defconst reftex-label-env-list nil)
+(defvar reftex-label-env-list nil)
 
 ;; List of all typekey letters in use.
-(defconst reftex-typekey-list nil)
+(defvar reftex-typekey-list nil)
 
 ;; Alist relating magic words to a label type.
-(defconst reftex-words-to-typekey-alist nil)
+(defvar reftex-words-to-typekey-alist nil)
 
 ;; The last list-of-labels entry used in a reference.
 (defvar reftex-last-used-reference (list nil nil nil nil))
 
 ;; Alist relating index macros to other info.
-(defconst reftex-key-to-index-macro-alist nil)
+(defvar reftex-key-to-index-macro-alist nil)
 ;; Prompt for index macro queries
-(defconst reftex-query-index-macro-prompt nil)
+(defvar reftex-query-index-macro-prompt nil)
 ;; Help string for index macro queries
-(defconst reftex-query-index-macro-help nil)
+(defvar reftex-query-index-macro-help nil)
 
 ;; The message when follow-mode is suspended
-(defconst reftex-no-follow-message
+(defvar reftex-no-follow-message
   "No follow-mode into unvisited file.  Press SPC to visit it.")
-(defconst reftex-no-info-message
+(defvar reftex-no-info-message
   "%s: info not available, use `\\[reftex-view-crossref]' to get it.")
 
 ;; Global variables used for communication between functions.
 		  reftex-section-levels))
 
     ;; Calculate the regular expressions
-    (let* ((wbol "\\(\\`\\|[\n\r]\\)[ \t]*")
+    (let* (
+;	   (wbol "\\(\\`\\|[\n\r]\\)[ \t]*")
+	   (wbol "\\(^\\)[ \t]*")  ; Need to keep the empty group because
+	                          ;;; because match number are hard coded  
 	   (label-re "\\\\label{\\([^}]*\\)}")
-	   (include-re (concat wbol "\\\\\\(include\\|input\\)[{ \t]+\\([^} \t\n\r]+\\)"))
+	   (include-re (concat wbol 
+			       "\\\\\\("
+			       (mapconcat 'identity 
+					  reftex-include-file-commands "\\|")
+			       "\\)[{ \t]+\\([^} \t\n\r]+\\)"))
 	   (section-re
 	    (concat wbol "\\\\\\("
 		    (mapconcat (lambda (x) (regexp-quote (car x)))
 ;;;============================================================================
 
 ;;; reftex.el ends here
-
 @synindex ky cp
 @syncodeindex vr cp
 @syncodeindex fn cp
-@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
-@set MAINTAINER-EMAIL dominik@@astro.uva.nl
+@set VERSION 4.18
+@set EDITION 4.18
+@set DATE July 2002
 @c %**end of header
 @finalout
 
 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 2001 Free Software Foundation, Inc.
+Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 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
 
 @author by Carsten Dominik
 @page
-Copyright @copyright{} 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright @copyright{} 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 @sp 2
 This is edition @value{EDITION} of the @cite{Ref@TeX{} User Manual} for
 * Viewing Cross-References::         Who references or cites what?
 
 * RefTeXs Menu::                     The Ref menu in the menubar.
-* Keybindings::                      The default keybindings.
+* Key Bindings::                      The default key bindings.
 * Faces::                            Fontification of RefTeX's buffers.
 * Multifile Documents::              Document spread over many files.
 * Language Support::                 How to support other languages.
 @noindent
 The labels for Axioms and Theorems will have the prefixes @samp{ax:} and
 @samp{thr:}, respectively.  @xref{AUCTeX}, for information on how
-AUCTeX can use @b{Ref@TeX{}} to automatically create labels when a new
-environment is inserted into a buffer.@refill
+AUCTeX can use RefTeX to automatically create labels when a new environment
+is inserted into a buffer.  Additionally, the following needs to be
+added to one's .emacs file before AUCTeX will automatically create
+labels for the new environments.
+
+@lisp
+(add-hook 'LaTeX-mode-hook
+   (lambda ()
+     (LaTeX-add-environments
+       '("axiom" LaTeX-env-label)
+       '("theorem" LaTeX-env-label))))
+@end lisp
+
 
 @noindent
 The @samp{~\ref@{%s@}} is a format string indicating how to insert
 @code{\ee}, point is not in this environment.  When the first match is
 @code{\be}, point is in this environment and the function must return
 the beginning of the match.  To avoid scanning too far, we can also look
-for empty lines which cannot occure inside an equation environment.
+for empty lines which cannot occur inside an equation environment.
 Here is the setup:@refill
 
 @lisp
 @samp{Einstein&&Bose} will match all articles which mention
 Bose-Einstein condensation, or which are co-authored by Bose and
 Einstein.  When entering the regular expression, you can complete on
-known citation keys.@refill
+known citation keys.  RefTeX also offeres a default when prompting for a
+regular expression.  This default is the word before the cursor or the
+word before the current @samp{\cite} comand.  Sometimes this may be a
+good search key.@refill
 
 @cindex @code{\bibliography}
 @cindex @code{thebibliography}, LaTeX environment
 @item e
 Edit the replacement text.
 @item C-r
-Recursive edit.  Use @kbd{M-C-c} to return to the indexing process.
+Recursive edit.  Use @kbd{C-M-c} to return to the indexing process.
 @item s
 Save this buffer and ask again about the current match.
 @item S
 @chapter All the Rest
 @end iftex
 
-@node RefTeXs Menu, Keybindings, Viewing Cross-References, Top
+@node RefTeXs Menu, Key Bindings, Viewing Cross-References, Top
 @section @b{Ref@TeX{}}'s Menu
 @cindex RefTeXs Menu
 @cindex Menu, in the menu bar
 @code{Customize} submenu which can be used to access @b{Ref@TeX{}}'s
 entire set of options.@refill
 
-@node Keybindings, Faces, RefTeXs Menu, Top
-@section Default Keybindings
-@cindex Keybindings, summary
-
-Here is a summary of the available keybindings.
+@node Key Bindings, Faces, RefTeXs Menu, Top
+@section Default Key Bindings
+@cindex Key Bindings, summary
+
+Here is a summary of the available key bindings.
 
 @kindex C-c =
 @kindex C-c (
 
 @c FIXME: Do we need bindings for the Index macros here as well?
 @c C-c i   C-c I or so????
-@c How about keybindings for reftex-reset-mode and reftex-parse-document?
+@c How about key bindings for reftex-reset-mode and reftex-parse-document?
 @kindex C-c t
 @kindex C-c l
 @kindex C-c r
 @end example
 
 @noindent These keys are reserved for the user, so I cannot bind them by
-default.  If you want to have these keybindings available, set in your
+default.  If you want to have these key bindings available, set in your
 @file{.emacs} file:
 
 @vindex reftex-extra-bindings
 @end lisp
 
 @vindex reftex-load-hook
-Changing and adding to @b{Ref@TeX{}}'s keybindings is best done in the hook
+Changing and adding to @b{Ref@TeX{}}'s key bindings is best done in the hook
 @code{reftex-load-hook}.  For information on the keymaps
 which should be used to add keys, see @ref{Keymaps and Hooks}.
 
-@node Faces, AUCTeX, Keybindings, Top
+@node Faces, AUCTeX, Key Bindings, Top
 @section Faces
 @cindex Faces
 
 @end lisp
 @end itemize
 
+@cindex Noweb files
+@vindex reftex-file-extensions
+@vindex TeX-file-extensions
+Some people like to use RefTeX with noweb files, which usually have the
+extension @file{.nw}.  In order to deal with such files, the new
+extension must be added to the list of valid extensions in the variable
+@code{reftex-file-extensions}.  When working with AUCTeX as major mode,
+the new extension must also be known to AUCTeX via the variable
+@code{TeX-file-extension}.  For example:
+
+@lisp
+(setq reftex-file-extensions 
+      '(("nw" "tex" ".tex" ".ltx") ("bib" ".bib")))
+(setq TeX-file-extensions 
+      '( "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo"))
+@end lisp
+
 @node Optimizations, Problems and Work-Arounds, Finding Files, Top
 @section Optimizations
 @cindex Optimizations
 @end group
 @end lisp
 
-@page
 @node AUCTeX, Multifile Documents, Faces, Top
 @section @w{AUC @TeX{}}
 @cindex @code{AUCTeX}, Emacs package
 
 AUCTeX is without doubt the best major mode for editing TeX and LaTeX
 files with Emacs (@pxref{Top,AUCTeX,,auctex, The AUCTeX User Manual}).
-If AUCTeX is not part of you Emacs distribution, you can get
+If AUCTeX is not part of your Emacs distribution, you can get
 it@footnote{XEmacs 21.x users may want to install the corresponding
 XEmacs package.} by ftp from the
 @uref{http://www.sunsite.auc.dk/auctex/,AUCTeX distribution site}.
 @item
 @b{LaTeX commands}@*
 @cindex LaTeX commands, not found
-@code{\input}, @code{\include}, @code{\bibliography} and @code{\section}
-(etc.) statements have to be first on a line (except for white space).@refill
+@code{\input}, @code{\include}, and @code{\section} (etc.) statements
+have to be first on a line (except for white space).@refill
 
 @item
 @b{Commented regions}@*
 @item
 @b{Viper mode}@*
 @cindex Viper mode
-@cindex Keybindings, problems with Viper mode
+@cindex Key bindings, problems with Viper mode
 @findex viper-harness-minor-mode
 With @i{Viper} mode prior to Vipers version 3.01, you need to protect
 @b{Ref@TeX{}}'s keymaps with@refill
 @cindex @code{http}, @b{Ref@TeX{}} home page
 @cindex @code{ftp}, @b{Ref@TeX{}} site
 
-@b{Ref@TeX{}} was written by @i{@value{AUTHOR}}
-@email{@value{AUTHOR-EMAIL}}, with contributions by @i{Stephen
+@b{Ref@TeX{}} was written by @i{@value{Carsten Dominik}}
+@email{dominik@@science.uva.nl}, with contributions by @i{Stephen
 Eglen}.  @b{Ref@TeX{}} is currently maintained by @refill
 
 @noindent
-@value{MAINTAINER} @email{@value{MAINTAINER-EMAIL}}
+@value{Carsten Dominik} @email{dominik@@science.uva.nl}
 
 If you have questions about @b{Ref@TeX{}}, there are several Usenet
 groups which have competent readers: @code{comp.emacs},
 
 If you find a bug in @b{Ref@TeX{}} or its documentation, or if you want
 to contribute code or ideas, please
-@uref{mailto:@value{MAINTAINER-EMAIL},contact the maintainer}.  Remember
+@uref{mailto:dominik@@science.uva.nl,contact the maintainer}.  Remember
 to provide all necessary information such as version numbers of Emacs
 and @b{Ref@TeX{}}, and the relevant part of your configuration in
 @file{.emacs}.  When reporting a bug which throws an exception, please
 
 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,
-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
+Burstall, Alastair Burt, Lars Clausen, Soren Dayton, Stephen Eglen, Karl
+Eichwalder, Erik Frik, Erik Frisk, Peter Galbraith, Kai Grossjohann,
+Frank Harrell, Stephan Heuel, Alan Ho, Dieter Kraft, Adrian Lanz, Rory
+Molinari, Stefan Monnier, Laurent Mugnier, Sudeep Kumar Palat, Daniel
+Polani, Alan Shutko, Robin Socha, Richard Stanton, Allan Strand, Jan
+Vroonhof, Christoph Wedler, Alan Williams, Roland Winkler, Eli
+Zaretskii}.@refill
 
 The @code{view-crossref} feature was inspired by @i{Peter Galbraith's}
 @file{bib-cite.el}.@refill
 Here is a summary of @b{Ref@TeX{}}'s commands which can be executed from
 LaTeX files.  Command which are executed from the special buffers are
 not described here.  All commands are available from the @code{Ref}
-menu.  For keybindings, @pxref{Keybindings}.
+menu.  See @xref{Key Bindings}.
 
 @deffn Command reftex-toc
 Show the table of contents for the current document.  When called with
 @cindex Options, table of contents
 @cindex Table of contents, options
 
+@defopt reftex-include-file-commands
+List of LaTeX commands which input another file.
+The file name is expected after the command, either in braces or separated
+by whitespace.
+@end defopt
+
+@defopt reftex-max-section-depth
+Maximum depth of section levels in document structure.
+Standard LaTeX needs 7, default is 12.
+@end defopt
+
+@defopt reftex-section-levels
+Commands and levels used for defining sections in the document.  The
+@code{car} of each cons cell is the name of the section macro.  The
+@code{cdr} is a number indicating its level.  A negative level means the
+same as the positive value, but the section will never get a
+number.  The @code{cdr} may also be a function which then has to return
+the level.@refill
+@end defopt
+
 @defopt reftex-toc-max-level
 The maximum level of toc entries which will be included in the TOC.
 Section headings with a bigger level will be ignored.  In RefTeX,
 changed from within the @file{*toc*} buffer with the @kbd{t} key.@refill
 @end defopt
 
+@defopt reftex-toc-split-windows-horizontally
+Non-@code{nil} means, create TOC window by splitting window
+horizontally.  The default is to split vertically.
+@end defopt
+
+@defopt reftex-toc-split-windows-horizontally-fraction
+Fraction of the horizontal width of the frame to be used for TOC window.
+Only relevant when @code{reftex-toc-split-windows-horizontally} is
+non-@code{nil}.
+@end defopt
+
 @defopt reftex-toc-keep-other-windows
 Non-@code{nil} means, split the selected window to display the
 @file{*toc*} buffer.  This helps to keep the window configuration, but
 with the variable @code{reftex-default-label-alist-entries}.@refill
 @end defopt
 
-@defopt reftex-max-section-depth
-Maximum depth of section levels in document structure.
-Standard LaTeX needs 7, default is 12.
-@end defopt
-
-@defopt reftex-section-levels
-Commands and levels used for defining sections in the document.  The
-@code{car} of each cons cell is the name of the section macro.  The
-@code{cdr} is a number indicating its level.  A negative level means the
-same as the positive value, but the section will never get a
-number.  The @code{cdr} may also be a function which then has to return
-the level.@refill
-@end defopt
-
 @defopt reftex-section-prefixes
 Prefixes for section labels.  When the label prefix given in an entry in
 @code{reftex-label-alist} contains @samp{%S}, this list is used to
 @cindex Options, creating citations
 @cindex Creating citations, options
 
+@defopt reftex-bibliography-commands
+LaTeX commands which specify the BibTeX databases to use with the document.
+@end defopt
+
 @defopt reftex-bibfile-ignore-regexps
 List of regular expressions to exclude files in
 @code{\\bibliography@{..@}}.  File names matched by any of these regexps
 case.@refill
 @end defopt
 
+@defopt reftex-index-verify-function
+A function which is called at each match during global indexing.
+If the function returns nil, the current match is skipped.
+@end defopt
+
 @defopt reftex-index-phrases-skip-indexed-matches
 Non-@code{nil} means, skip matches which appear to be indexed already.
 When doing global indexing from the phrases buffer, searches for some
 @defopt reftex-extra-bindings
 Non-@code{nil} means, make additional key bindings on startup.  These
 extra bindings are located in the users @samp{C-c letter}
-map. @xref{Keybindings}.@refill
+map.  @xref{Key Bindings}.@refill
 @end defopt
 
 @defopt reftex-plug-into-AUCTeX
 @itemize @bullet
 @item
 New option @code{reftex-toc-max-level} to limit the depth of the toc.
-New keybinding @kbd{t} in the @file{*toc*} buffer to change this
+New key binding @kbd{t} in the @file{*toc*} buffer to change this
 setting.@refill 
 @item
 RefTeX maintaines an @file{Index Phrases} file in which phrases can be 
 @noindent @b{Version 4.15}
 @itemize @bullet
 @item
+Fixed bug with parsing of BibTeX files, when fields contain quotes or
+unmatched parenthesis.
+@item
 Small bug fixes.
 @item
 Improved interaction with Emacs LaTeX mode.
 @end itemize
+@noindent @b{Version 4.17}
+@itemize @bullet
+@item 
+The toc window can be split off horizontally.  See new options
+@code{reftex-toc-split-windows-horizontally},
+@code{reftex-toc-split-windows-horizontally-fraction}.
+@item
+It is possible to specify a function which verifies an index match
+during global indexing.  See new option @code{reftex-index-verify-function}.
+@item
+The macros which input a file in LaTeX (like \input, \include) can
+be configured.  See new option @code{reftex-include-file-commands}.
+@item
+The macros which specify the bibliography file (like \bibliography) can
+be configured.  See new option @code{reftex-bibliography-commands}.
+@item
+The regular expression used to search for the \bibliography macro has
+been relaxed to allow for @samp{@{\bibliography@{...@}@}} needed by
+chapterbib.
+@item
+Small bug fixes.
+@end itemize
+@noindent @b{Version 4.18}
+@itemize @bullet
+@item
+@code{reftex-citation} uses the word before the cursor as a default
+search string.
+@end itemize
 
 @node Index,  , , Top
 @unnumbered Index