]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/reftex-vars.el
Update years in copyright notice; nfc.
[gnu-emacs] / lisp / textmodes / reftex-vars.el
index 7243641ea277ef0531ec779ad44bb81888dda9be..b8eddcd0386f4823df7a2a31d6e3126de22f8cb4 100644 (file)
@@ -1,9 +1,36 @@
-;;; reftex-vars.el - Configuration variables for RefTeX
-;;; Version: 4.5
-;;;
-;;; See main file reftex.el for licensing information
+;;; reftex-vars.el --- configuration variables for RefTeX
+;; Copyright (C) 1997, 1998, 1999, 2003, 2004, 2005,
+;;   2006 Free Software Foundation, Inc.
 
-(provide 'reftex-vars)
+;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Version: VERSIONTAG
+
+;; This file is part of GNU Emacs.
+
+;; 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 2, 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
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE   See the
+;; 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.
+
+;;; Commentary:
+
+;;; Code:
+(eval-when-compile (defvar reftex-tables-dirty))
+(eval-when-compile (require 'cl))
+(eval-and-compile
+  (defun reftex-set-dirty (symbol value)
+    (setq reftex-tables-dirty t)
+    (set symbol value)))
 
 ;; Define the two constants which are needed during compilation
 
@@ -67,9 +94,9 @@
     (LaTeX       "LaTeX default environments"
      (("section"   ?s "%S" "~\\ref{%s}" (nil . t)
        (regexp "parts?" "chapters?" "chap\\." "sections?" "sect?\\."
-              "paragraphs?" "par\\."
-              "\\\\S" "\247" "Teile?" "Kapitel" "Kap\\." "Abschnitte?"
-              "appendi\\(x\\|ces\\)" "App\\."  "Anh\"?ange?" "Anh\\."))
+               "paragraphs?" "par\\."
+               "\\\\S" "\247" "Teile?" "Kapitel" "Kap\\." "Abschnitte?"
+               "appendi\\(x\\|ces\\)" "App\\."  "Anh\"?ange?" "Anh\\."))
 
       ("enumerate" ?i "item:" "~\\ref{%s}" item
        (regexp "items?" "Punkte?"))
@@ -102,21 +129,52 @@ distribution.  Mixed-case symbols are convenience aliases.")
 
 (defconst reftex-cite-format-builtin
   '((default "Default macro \\cite{%l}"
-      "\\cite{%l}")
+      "\\cite[]{%l}")
     (natbib "The Natbib package"
+     ((?\C-m . "\\cite[][]{%l}")
+      (?t    . "\\citet[][]{%l}")
+      (?T    . "\\citet*[][]{%l}")
+      (?p    . "\\citep[][]{%l}")
+      (?P    . "\\citep*[][]{%l}")
+      (?e    . "\\citep[e.g.][]{%l}")
+      (?s    . "\\citep[see][]{%l}")
+      (?a    . "\\citeauthor{%l}")
+      (?A    . "\\citeauthor*{%l}")
+      (?y    . "\\citeyear{%l}")
+      (?n    . "\\nocite{%l}")))
+    (amsrefs "The AMSRefs package"
+     ((?\C-m . "\\cite{%l}")
+      (?p    . "\\cite{%l}")
+      (?P    . "\\cites{%l}")
+      (?t    . "\\ocite{%l}")
+      (?T    . "\\ocites{%l}")
+      (?y    . "\\ycite{%l}")
+      (?Y    . "\\ycites{%l}")
+      (?a    . "\\citeauthor{%l}")
+      (?A    . "\\citeauthory{%l}")
+      (?f    . "\\fullcite{%l}")
+      (?F    . "\\fullocite{%l}")
+      (?n    . "\\nocite{%l}")))
+    (jurabib "The Jurabib package"
      ((?\C-m . "\\cite{%l}")
+      (?c    . "\\cite[][]{%l}")
       (?t    . "\\citet{%l}")
-      (?T    . "\\citet*{%l}")
       (?p    . "\\citep{%l}")
-      (?P    . "\\citep*{%l}")
       (?e    . "\\citep[e.g.][]{%l}")
       (?s    . "\\citep[see][]{%l}")
+      (?u    . "\\fullcite{%l}")
+      (?i    . "\\citetitle{%l}")
       (?a    . "\\citeauthor{%l}")
-      (?A    . "\\citeauthor*{%l}")
-      (?y    . "\\citeyear{%l}")))
+      (?e    . "\\citefield{}{%l}")
+      (?y    . "\\citeyear{%l}")
+      (?f    . "\\footcite{%l}")
+      (?F    . "\\footcite[][]{%l}")
+      (?l    . "\\footfullcite{%l}")))
+    (bibentry "The Bibentry package"
+      "\\bibentry{%l}")
     (harvard "The Harvard package"
-     ((?\C-m . "\\cite{%l}")
-      (?p    . "\\cite{%l}")
+     ((?\C-m . "\\cite[]{%l}")
+      (?p    . "\\cite[]{%l}")
       (?t    . "\\citeasnoun{%l}")
       (?n    . "\\citeasnoun{%l}")
       (?s    . "\\possessivecite{%l}")
@@ -124,17 +182,17 @@ distribution.  Mixed-case symbols are convenience aliases.")
       (?y    . "\\citeyear{%l}")
       (?a    . "\\citename{%l}")))
     (chicago "The Chicago package"
-     ((?\C-m . "\\cite{%l}")
-      (?t    . "\\citeN{%l}")
+     ((?\C-m . "\\cite[]{%l}")
+      (?t    . "\\citeN[]{%l}")
       (?T    . "\\shortciteN{%l}")
-      (?p    . "\\cite{%l}")
+      (?p    . "\\cite[]{%l}")
       (?P    . "\\shortcite{%l}")
       (?a    . "\\citeA{%l}")
       (?A    . "\\shortciteA{%l}")
       (?y    . "\\citeyear{%l}")))
     (astron "The Astron package"
-     ((?\C-m . "\\cite{%l}")
-      (?p    . "\\cite{%l}" )
+     ((?\C-m . "\\cite[]{%l}")
+      (?p    . "\\cite[]{%l}" )
       (?t    . "%2a (\\cite{%l})")))
     (author-year "Do-it-yourself Author-year"
      ((?\C-m . "\\cite{%l}")
@@ -151,18 +209,18 @@ The following conventions are valid for all alist entries:
 
 (defconst reftex-index-macros-builtin 
   '((default "Default \\index and \\glossary macros"
-      (("\\index{*}" "idx" ?i "" nil)
-       ("\\glossary{*}" "glo" ?g "" nil)))
+      (("\\index{*}" "idx" ?i "" nil t)
+       ("\\glossary{*}" "glo" ?g "" nil t)))
     (multind "The multind.sty package"
-       (("\\index{}{*}" 1 ?i "" nil)))
+       (("\\index{}{*}" 1 ?i "" nil t)))
     (index "The index.sty package"
-          (("\\index[]{*}" 1 ?i "" nil)
-           ("\\index*[]{*}" 1 ?I "" nil)))
+           (("\\index[]{*}" 1 ?i "" nil t)
+            ("\\index*[]{*}" 1 ?I "" nil nil)))
     (Index-Shortcut "index.sty with \\shortindexingon"
-       (("\\index[]{*}" 1 ?i "" nil)
-       ("\\index*[]{*}" 1 ?I "" nil)
-       ("^[]{*}" 1 ?^ "" texmathp)   
-       ("_[]{*}" 1 ?_ "" texmathp))))
+       (("\\index[]{*}" 1 ?i "" nil t)
+        ("\\index*[]{*}" 1 ?I "" nil nil)
+        ("^[]{*}" 1 ?^ "" texmathp t)   
+        ("_[]{*}" 1 ?_ "" texmathp nil))))
   "Builtin stuff for reftex-index-macros.
 Lower-case symbols correspond to a style file of the same name in the LaTeX
 distribution.  Mixed-case symbols are convenience aliases.")
@@ -174,18 +232,122 @@ distribution.  Mixed-case symbols are convenience aliases.")
   "LaTeX label and citation support."
   :tag "RefTeX"
   :link '(url-link :tag "Home Page" 
-                  "http://strw.leidenuniv.nl/~dominik/Tools/")
+                   "http://zon.astro.uva.nl/~dominik/Tools/")
   :link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el")
   :link '(custom-manual "(reftex)Top")
   :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)
+    ("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.
+This list is also used for promotion and demption of sectioning commands.
+If you are using a document class which has several sets of sectioning
+commands, promotion only works correctly if this list is sorted first
+by set, then within each set by level.  The promotion commands always
+select the nearest entry with the correct new 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
+are level 1, sections are level 2 etc.
+This variable can be changed from within the *toc* buffer with the `t' key."
+  :group 'reftex-table-of-contents-browser
+  :type 'integer)
+
+(defcustom reftex-part-resets-chapter nil
+  "*Non-nil means, \\part is like any other sectioning command.
+This means, part numbers will be included in the numbering of chapters, and
+chapter counters will be reset for each part.
+When nil (the default), parts are special, do not reset the chapter counter
+and also do not show up in chapter numbers."
+  :group 'reftex-table-of-contents-browser
+  :type 'boolean)
+
+
+(defcustom reftex-auto-recenter-toc 'frame
+  "*Non-nil means, turn automatic recentering of *TOC* window on.
+When active, the *TOC* window will always show the section you
+are currently working in.  Recentering happens whenever Emacs is idle for
+more than `reftex-idle-time' seconds.
+
+Value t means, turn on immediately when RefTeX gets started.  Then,
+recentering will work for any toc window created during the session.
+
+Value 'frame (the default) means, turn automatic recentering on only while the
+dedicated TOC frame does exist, and do the recentering only in that frame.  So
+when creating that frame (with \"d\" key in an ordinary TOC window), the
+automatic recentering is turned on.  When the frame gets destroyed, automatic
+recentering is turned off again.
+
+This feature can be turned on and off from the menu 
+\(Ref->Options)."
+  :group 'reftex-table-of-contents-browser
+  :type '(choice
+          (const :tag "never" nil)
+          (const :tag "always" t)
+          (const :tag "in dedicated frame only" frame)))
+(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-fraction .3
+  "*Fraction of the width or height of the frame to be used for TOC window.
+See also `reftex-toc-split-windows-horizontally'."
+  :group 'reftex-table-of-contents-browser
+  :type 'number)
+
+(defvar reftex-toc-split-windows-horizontally-fraction 0.5
+  "This variable is obsolete, use `reftex-toc-split-windows-fraction' instead.")
+
 (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.
@@ -212,6 +374,17 @@ This flag can be toggled from within the *toc* buffer with the `i' key."
   :group 'reftex-table-of-contents-browser
   :type 'boolean)
 
+(defcustom reftex-toc-confirm-promotion 2
+  "*Non-nil means, promotion/demotion commands first prompt for confirmation.
+When nil, the command is executed immediately.  When this is an integer
+N, ask for confirmation only if N or more section commands are going to be
+changed."
+  :group 'reftex-table-of-contents-browser
+  :type '(choice
+          (const  :tag "Never" nil)
+          (const  :tag "Always" t)
+          (number :tag "When more than N sections" :value 2)))
+
 (defcustom reftex-toc-include-context nil
   "*Non-nil means, include context with labels in the *toc* buffer.
 Context will only be shown when labels are visible as well.
@@ -250,7 +423,7 @@ When nil, follow-mode will be suspended for stuff in unvisited files."
 
 (defcustom reftex-default-label-alist-entries
   '(amsmath endnotes fancybox floatfig longtable picinpar
-           rotating sidecap subfigure supertab wrapfig LaTeX)
+            rotating sidecap subfigure supertab wrapfig LaTeX)
   "Default label alist specifications.  LaTeX should always be the last entry.
 The value of this variable is a list of symbols with associations in the 
 constant `reftex-label-alist-builtin'.  Check that constant for a full list
@@ -258,14 +431,14 @@ of options."
   :group 'reftex-defining-label-environments
   :set   'reftex-set-dirty
   :type `(set
-         :indent 4
+          :indent 4
           :inline t
           :greedy t
           ,@(mapcar
-            (lambda (x)
-              (list 'const :tag (concat (symbol-name (nth 0 x))
-                                        ": " (nth 1 x))
-                    (nth 0 x)))
+             (lambda (x)
+               (list 'const :tag (concat (symbol-name (nth 0 x))
+                                         ": " (nth 1 x))
+                     (nth 0 x)))
              reftex-label-alist-builtin)))
 
 (defcustom reftex-label-alist nil
@@ -284,7 +457,7 @@ The value of the variable must be a list of items.  Each item is a list
 itself and has the following structure:
 
  (ENV-OR-MACRO TYPE-KEY LABEL-PREFIX REFERENCE-FORMAT CONTEXT-METHOD
-           (MAGIC-WORD ... ))
+           (MAGIC-WORD ... ) TOC-LEVEL)
 
 Each list entry describes either an environment carrying a counter for use
 with \\label and \\ref, or a LaTeX macro defining a label as (or inside)
@@ -301,7 +474,7 @@ ENV-OR-MACRO
     which contains all labels.
 
     This may also be a function to do local parsing and identify point
-    to be in 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
@@ -318,7 +491,7 @@ TYPE-KEY
     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
@@ -327,6 +500,8 @@ LABEL-PREFIX
     empty string.  The prefix may contain the following `%' escapes:
        %f   Current file name with directory and extension stripped.
        %F   Current file name relative to directory of master file.
+       %m   Master file name, directory and extension stripped.
+       %M   Directory name (without path) where master file is located.
        %u   User login name, on systems which support this.
        %S   A section prefix derived with variable `reftex-section-prefixes'.
 
@@ -385,6 +560,14 @@ MAGIC-WORDS
     strings are interpreted as regular expressions.  RefTeX will add
     a \"\\\\W\" to the beginning and other stuff to the end of the regexp.
 
+TOC-LEVEL
+    The integer level at which this environment should be added to the
+    table of contents.  See also `reftex-section-levels'.  A positive
+    value will number the entries mixed with the sectioning commands of
+    the same level.  A negative value will make unnumbered entries.
+    Useful only for theorem-like environments, will be ignored for macros.
+    When omitted or nil, no TOC entries will be made.
+
 If the type indicator characters of two or more entries are the same, RefTeX
 will use
  - the first non-nil format and prefix
@@ -405,10 +588,10 @@ list.  However, builtin defaults should normally be set with the variable
            (choice    :tag "Environment or \\macro "
                       (const  :tag "Ignore, just use typekey" nil)
                       (string "")
-                     (symbol :tag "Special parser" my-parser))
-          (choice    :tag "Type specification    "
-                     (const :tag "unspecified, like in \\label" nil)
-                     (character :tag "Char  " ?a))
+                      (symbol :tag "Special parser" my-parser))
+           (choice    :tag "Type specification    "
+                      (const :tag "unspecified, like in \\label" nil)
+                      (character :tag "Char  " ?a))
            (choice    :tag "Label prefix string   "
                       (const  :tag "Default" nil)
                       (string :tag "String" "lab:"))
@@ -416,51 +599,27 @@ list.  However, builtin defaults should normally be set with the variable
                       (const  :tag "Default" nil)
                       (string :tag "String" "~\\ref{%s}"))
            (choice    :tag "Context method        "
-                     (const  :tag "Default position" t)
-                     (const  :tag "After label"      nil)
-                     (number :tag "Macro arg nr" 1)
-                     (regexp :tag "Regexp" "")
-                     (const  :tag "Caption in float" caption)
-                     (const  :tag "Item in list" item)
-                     (const  :tag "Eqnarray-like" eqnarray-like)
-                     (const  :tag "Alignat-like" alignat-like)
-                     (symbol :tag "Function" my-func))
-          (repeat :tag "Magic words" :extra-offset 2 (string)))
+                      (const  :tag "Default position" t)
+                      (const  :tag "After label"      nil)
+                      (number :tag "Macro arg nr" 1)
+                      (regexp :tag "Regexp" "")
+                      (const  :tag "Caption in float" caption)
+                      (const  :tag "Item in list" item)
+                      (const  :tag "Eqnarray-like" eqnarray-like)
+                      (const  :tag "Alignat-like" alignat-like)
+                      (symbol :tag "Function" my-func))
+           (repeat :tag "Magic words" :extra-offset 2 (string))
+           (option (choice :tag "Make TOC entry     "
+                           (const :tag "No entry" nil)
+                           (integer :tag "Level" :value -3))))
      (choice
       :tag "Package"
       :value AMSTeX
       ,@(mapcar
-        (lambda (x)
-          (list 'const :tag (concat (symbol-name (nth 0 x)))
-                (nth 0 x)))
-        reftex-label-alist-builtin)))))
-
-;; 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."
-  :group 'reftex-defining-label-environments
-  :set 'reftex-set-dirty
-  :type '(repeat
-          (cons (string :tag "sectioning macro" "")
-                (number :tag "level           " 0))))
+         (lambda (x)
+           (list 'const :tag (concat (symbol-name (nth 0 x)))
+                 (nth 0 x)))
+         reftex-label-alist-builtin)))))
 
 (defcustom reftex-section-prefixes '((0 . "part:") (1 . "cha:") (t . "sec:"))
   "Prefixes for section labels.
@@ -469,15 +628,15 @@ this list is used to determine the correct prefix string depending on the
 current section level.
 The list is an alist, with each entry of the form (KEY . PREFIX)
 Possible keys are sectioning macro names like `chapter', section levels
-(as given in `reftex-section-levels'), and t for the default."
+\(as given in `reftex-section-levels'), and t for the default."
   :group 'reftex-defining-label-environments
   :type '(repeat
-         (cons :value (0 . "")
-               (choice
-                (string :tag  "macro name")
-                (integer :tag "section level")
-                (const :tag "default" t))
-               (string :tag "Prefix"))))
+          (cons :value (0 . "")
+                (choice
+                 (string :tag  "macro name")
+                 (integer :tag "section level")
+                 (const :tag "default" t))
+                (string :tag "Prefix"))))
 
 (defcustom reftex-default-context-regexps
   '((caption       . "\\\\\\(rot\\)?caption\\*?[[{]")
@@ -490,6 +649,43 @@ the final regular expression - so %s will be replaced with the environment
 or macro."
   :group 'reftex-defining-label-environments
   :type '(repeat (cons (symbol) (regexp))))
+
+(defcustom reftex-trust-label-prefix nil
+  "Non-nil means, trust the label prefix when determining label type.
+It is customary to use special label prefixes to distinguish different label
+types.  The label prefixes have no syntactic meaning in LaTeX (unless
+special packages like fancyref are being used).  RefTeX can and by
+default does parse around each label to detect the correct label type,
+but this process can be slow when a document contains thousands of
+labels.  If you use label prefixes consistently, you may speed up
+document parsing by setting this variable to a non-nil value.  RefTeX
+will then compare the label prefix with the prefixes found in
+`reftex-label-alist' and derive the correct label type in this way.
+Possible values for this option are:
+
+t          This means to trust any label prefixes found.
+regexp     If a regexp, only prefixes matched by the regexp are trusted.
+list       List of accepted prefixes, as strings.  The colon is part of
+           the prefix, e.g. (\"fn:\" \"eqn:\" \"item:\").
+nil        Never trust a label prefix.
+
+The only disadvantage of using this feature is that the label context
+displayed in the label selection buffer along with each label is
+simply some text after the label definition.  This is no problem if you
+place labels keeping this in mind (e.g. *before* the equation, *at
+the beginning* of a fig/tab caption ...).  Anyway, it is probably best
+to use the regexp or the list value types to fine-tune this feature.
+For example, if your document contains thousands of footnotes with
+labels fn:xxx, you may want to set this variable to the value \"^fn:$\" or
+\(\"fn:\").  Then RefTeX will still do extensive parsing for any
+non-footnote labels."
+  :group 'reftex-defining-label-environments
+  :type '(choice
+          (const :tag "Always" t)
+          (const :tag "Never" nil)
+          (regexp)
+          (repeat :tag "List"
+                  (string :tag "prefix (with colon)"))))
   
 (defcustom reftex-special-environment-functions nil
   "List of functions to be called when trying to figure out current environment.
@@ -567,7 +763,7 @@ And here is the setup for RefTeX:
 
 If DERIVE is t, RefTeX will try to derive a sensible label from context.
 A section label for example will be derived from the section heading.
-The conversion of the context to a legal label is governed by the
+The conversion of the context to a valid label is governed by the
 specifications given in `reftex-derive-label-parameters'.
 If RefTeX fails to derive a label, it will prompt the user.
 If DERIVE is nil, the label generated will consist of the prefix and a
@@ -593,7 +789,7 @@ indicating the label types for which it should be true.  The strings work
 like character classes.
 Thus, the combination may be set differently for each label type.  The
 default settings \"s\" and \"sft\" mean: Derive section labels from headings
-(with confirmation).  Prompt for figure and table labels.  Use simple labels
+\(with confirmation).  Prompt for figure and table labels.  Use simple labels
 without confirmation for everything else.
 The available label types are: s (section), f (figure), t (table), i (item),
 e (equation), n (footnote), N (endnote), plus any definitions in
@@ -610,7 +806,7 @@ e (equation), n (footnote), N (endnote), plus any definitions in
                         (string :tag "selected label types" ""))))
 
 (defcustom reftex-string-to-label-function 'reftex-string-to-label
-  "Function to turn an arbitrary string into a legal label.
+  "Function to turn an arbitrary string into a valid label.
 RefTeX's default function uses the variable `reftex-derive-label-parameters'."
   :group 'reftex-making-and-inserting-labels
   :type 'symbol)
@@ -618,7 +814,7 @@ RefTeX's default function uses the variable `reftex-derive-label-parameters'."
 (defcustom reftex-translate-to-ascii-function 'reftex-latin1-to-ascii
   "Filter function which will process a context string before it is used
 to derive a label from it.  The intended application is to convert ISO or
-Mule characters into something legal in labels.  The default function
+Mule characters into something valid in labels.  The default function
 removes the accents from Latin-1 characters.  X-Symbol (>=2.6) sets this
 variable to the much more general `x-symbol-translate-to-ascii'."
   :group 'reftex-making-and-inserting-labels
@@ -631,8 +827,8 @@ This variable is a list of the following items.
 
 NWORDS      Number of words to use.
 MAXCHAR     Maximum number of characters in a label string.
-ILLEGAL     nil: Throw away any words containing characters illegal in labels.
-            t:   Throw away only the illegal characters, not the whole word.
+INVALID     nil: Throw away any words containing characters invalid in labels.
+            t:   Throw away only the invalid characters, not the whole word.
 ABBREV      nil: Never abbreviate words.
             t:   Always abbreviate words (see `reftex-abbrev-parameters').
             not t and not nil: Abbreviate words if necessary to shorten
@@ -643,7 +839,7 @@ DOWNCASE    t:   Downcase words before using them."
   :group 'reftex-making-and-inserting-labels
   :type  '(list (integer :tag "Number of words            "  3)
                 (integer :tag "Maximum label length       " 20)
-                (choice  :tag "Illegal characters in words"
+                (choice  :tag "Invalid characters in words"
                          (const :tag "throw away entire word" nil)
                          (const :tag "throw away single chars" t))
                 (choice  :tag "Abbreviate words           "
@@ -654,10 +850,10 @@ DOWNCASE    t:   Downcase words before using them."
                 (repeat  :tag "Ignore words"
                          :entry-format "           %i %d %v"
                          (string :tag ""))
-               (option (boolean :tag "Downcase words          "))))
+                (option (boolean :tag "Downcase words          "))))
 
 (defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]"
-  "Regexp matching characters not legal in labels."
+  "Regexp matching characters not valid in labels."
   :group 'reftex-making-and-inserting-labels
   :type '(regexp :tag "Regular Expression"))
 
@@ -680,7 +876,7 @@ AFTER        Character class after  abbrev point in word."
   "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)
@@ -737,7 +933,7 @@ get one interactively during selection from the label menu."
   "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
@@ -781,11 +977,11 @@ a label type.  If you set this variable to nil, RefTeX will always prompt."
   "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)
@@ -801,6 +997,12 @@ string to insert into the buffer."
   "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{..}.
@@ -814,7 +1016,7 @@ like, which are ignored by RefTeX anyway."
 (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."
@@ -844,7 +1046,7 @@ If `reftex-cite-format' is a string, it will be used as the format.
 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)
@@ -863,6 +1065,9 @@ display, and for (setq reftex-comment-citations t).
 %< as a special operator kills punctuation and space around it after the 
 string has been formatted.
 
+A pair of square brackets indicates an optional argument, and RefTeX
+will prompt for the values of these arguments.
+
 Beware that all this only works with BibTeX database files.  When
 citations are made from the \\bibitems in an explicit thebibliography
 environment, only %l is available.
@@ -895,6 +1100,42 @@ E.g.: (setq reftex-cite-format 'natbib)"
             (cons (character :tag "Key character" ?\r)
                   (string    :tag "Format string" "")))))
 
+(defcustom reftex-cite-prompt-optional-args 'maybe
+  "*Non-nil means, prompt for empty optional arguments in cite macros.
+When an entry in `reftex-cite-format' ist given with square brackets to
+indicate optional arguments (for example \\cite[][]{%l}), RefTeX can
+prompt for values.  Possible values are:
+
+nil     Never prompt for optional arguments
+t       Always prompt
+maybe   Prompt only if `reftex-citation' was called with C-u prefix arg
+
+Unnecessary empty optional arguments are removed before insertion into
+the buffer.  See `reftex-cite-cleanup-optional-args'."
+  :group 'reftex-citation-support
+  :type '(choice
+          (const :tag "Always" t)
+          (const :tag "When called with prefix arg" maybe)
+          (const :tag "Never" nil)))
+
+(defcustom reftex-cite-cleanup-optional-args t
+  "*Non-nil means, remove unnecessary empty optional arguments in cite macros.
+The cite macros provided by some packages (for example
+natbib) allow specifying two optional arguments, one for a prefix to
+the citation, and a second for a postfix.  When only one optional
+argument is given, it is interpreted as postfix.  When this option is
+t, RefTeX removes unnecessary empty optional arguments from the cite
+macro before insertion.  For example, it will change
+    \\cite[][]{Jones}              -> \\cite{Jones}
+    \\cite[][Chapter 1]{Jones}     -> \\cite[Chapter 1]{Jones}
+    \\cite[see][]{Jones}           -> \\cite[see][]{Jones}
+    \\cite[see][Chapter 1]{Jones}  -> \\cite{Jones}
+Is is possible that other packages have other conventions about which
+optional argument is interpreted how - that is why this cleaning up
+can be turned off."
+  :group 'reftex-citation-support
+  :type 'boolean)
+
 (defcustom reftex-comment-citations nil
   "*Non-nil means add a comment for each citation describing the full entry.
 The comment is formatted according to `reftex-cite-comment-format'."
@@ -963,16 +1204,16 @@ you will be asked for confirmation to turn it on and rescan the document."
 These correspond to the makeindex keywords LEVEL ENCAP ACTUAL QUOTE ESCAPE."
   :group 'reftex-index-support
   :type '(list
-         (string :tag "LEVEL  separator")
-         (string :tag "ENCAP  char     ")
-         (string :tag "ACTUAL char     ")
-         (string :tag "QUOTE  char     ")
-         (string :tag "ESCAPE char     ")))
+          (string :tag "LEVEL  separator")
+          (string :tag "ENCAP  char     ")
+          (string :tag "ACTUAL char     ")
+          (string :tag "QUOTE  char     ")
+          (string :tag "ESCAPE char     ")))
 
 (defcustom reftex-index-macros nil
   "Macros which define index entries.  The structure is
 
-(MACRO INDEX-TAG KEY PREFIX EXCLUDE)
+\(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT)
 
 MACRO is the macro.  Arguments should be denoted by empty braces like
 \\index[]{*}.  Use square brackets to denote optional arguments.  The star
@@ -994,9 +1235,14 @@ EXCLUDE can be a function.  If this function exists and returns a non-nil
 value, the index entry at point is ignored.  This was implemented to support
 the (deprecated) `^' and `_' shortcuts in the LaTeX2e `index' package.
 
+REPEAT, if non-nil, means the index macro does not typeset the entry in
+the text, so that the text has to be repeated outside the index macro.
+Needed for `reftex-index-selection-or-word' and for indexing from the
+phrase buffer.
+
 The final entry may also be a symbol if this entry has a association
 in the variable `reftex-index-macros-builtin' to specify the main
-indexing package you are using.  Legal values are currently
+indexing package you are using.  Valid values are currently
 default         The LaTeX default - unnecessary to specify this one
 multind         The multind.sty package
 index           The index.sty package
@@ -1008,73 +1254,160 @@ package here."
   :group 'reftex-index-support
   :set 'reftex-set-dirty
   :type `(list
-         (repeat 
-          :inline t
-          (list :value ("" "idx" ?a "" nil)
-                (string :tag "Macro with args")
-                (choice :tag "Index Tag      "
-                        (string)
-                        (integer :tag "Macro arg Nr" :value 1))
-                (character :tag "Access Key     ")
-                (string :tag "Key Prefix     ")
-                (symbol :tag "Exclusion hook ")))
-         (option
-          :tag "Package:"
-          (choice :tag "Package"
-                  :value index
-                  ,@(mapcar
-                     (lambda (x)
-                       (list 'const :tag (concat (symbol-name (nth 0 x))
-                                                 ": " (nth 1 x))
-                             (nth 0 x)))
-                     reftex-index-macros-builtin)))))
-
-(defcustom reftex-index-default-macro '(?i "idx" t)
+          (repeat 
+           :inline t
+           (list :value ("" "idx" ?a "" nil)
+                 (string  :tag "Macro with args")
+                 (choice  :tag "Index Tag      "
+                         (string)
+                         (integer :tag "Macro arg Nr" :value 1))
+                 (character :tag "Access Key     ")
+                 (string  :tag "Key Prefix     ")
+                 (symbol  :tag "Exclusion hook ")
+                 (boolean :tag "Repeat Outside ")))
+          (option
+           :tag "Package:"
+           (choice :tag "Package"
+                   :value index
+                   ,@(mapcar
+                      (lambda (x)
+                        (list 'const :tag (concat (symbol-name (nth 0 x))
+                                                  ": " (nth 1 x))
+                              (nth 0 x)))
+                      reftex-index-macros-builtin)))))
+
+(defcustom reftex-index-default-macro '(?i "idx")
   "The default index macro for \\[reftex-index-selection-or-word].
-This is a list with (MACRO-KEY DEFAULT-TAG REPEAT-WORD).
+This is a list with (MACRO-KEY DEFAULT-TAG).
 
 MACRO-KEY:   Character identifying an index macro - see `reftex-index-macros'.
 DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument.  
              When this is nil and a TAG is needed, RefTeX will ask for it.
              When this is the empty string and the TAG argument of the index
-             macro is optional, the TAG argument will be omitted.
-REPEAT-WORD: Non-nil means, the index macro does not typeset the entry in
-             the text, so that the text has to be repeated outside the index
-             macro." 
+             macro is optional, the TAG argument will be omitted."
   :group 'reftex-index-support
   :type '(list
-         (character :tag "Character identifying default macro")
-         (choice    :tag "Default index tag                  "
-                 (const nil)
-                 (string))
-         (boolean   :tag "Word needs to be repeated          ")))
+          (character :tag "Character identifying default macro")
+          (choice    :tag "Default index tag                  "
+                  (const nil)
+                  (string))))
 
 (defcustom reftex-index-default-tag "idx"
   "Default index tag.
 When working with multiple indexes, RefTeX queries for an index tag when
 creating index entries or displaying a specific index.  This variable controls
 the default offered for these queries.  The default can be selected with RET
-during selection or completion.  Legal values of this variable are:
+during selection or completion.  Valid values of this variable are:
 
 nil       Do not provide a default index
 \"tag\"     The default index tag given as a string, e.g. \"idx\".
 last      The last used index tag will be offered as default."
   :group 'reftex-index-support
   :type '(choice
-         (const :tag  "no default" nil)
-         (const :tag  "last used " 'last)
-         (string :tag "index tag " "idx")))
+          (const :tag  "no default" nil)
+          (const :tag  "last used " 'last)
+          (string :tag "index tag " "idx")))
 
 (defcustom reftex-index-math-format "$%s$"
   "Format of index entries when copied from inside math mode.
 When `reftex-index-selection-or-word' is executed inside TeX math mode,
 the index key copied from the buffer is processed with this format string
 through the `format' function.  This can be used to add the math delimiters
-(e.g. `$') to the string.
+\(e.g. `$') to the string.
 Requires the `texmathp.el' library which is part of AUCTeX."
   :group 'reftex-index-support
   :type 'string)
 
+(defcustom reftex-index-phrase-file-extension ".rip"
+  "File extension for the index phrase file.
+This extension will be added to the base name of the master file."
+  :group 'reftex-index-support
+  :type 'string)
+
+(defcustom reftex-index-phrases-logical-and-regexp " *&& *"
+  "Regexp matching the `and' operator for index arguments in phrases file.
+When several index arguments in a phrase line are separated by this
+operator, each part will generate an index macro.  So each match of
+the search phrase will produce *several* different index entries.
+
+Note: make sure this does no match things which are not separators.
+This logical `and' has higher priority than the logical `or' specified in
+`reftex-index-phrases-logical-or-regexp'."
+  :group 'reftex-index-support
+  :type 'regexp)
+
+(defcustom reftex-index-phrases-logical-or-regexp " *|| *"
+  "Regexp matching the `or' operator for index arguments in phrases file.
+When several index arguments in a phrase line are separated by this
+operator, the user will be asked to select one of them at each match
+of the search phrase.  The first index arg will be the default - a
+number key 1-9 must be pressed to switch to another.
+
+Note: make sure this does no match things which are not separators.
+The logical `and' specified in `reftex-index-phrases-logical-or-regexp'
+has higher priority than this logical `or'."
+  :group 'reftex-index-support
+  :type 'regexp)
+
+(defcustom reftex-index-phrases-search-whole-words t
+  "*Non-nil means phrases search will look for whole words, not subwords.
+This works by requiring word boundaries at the beginning and end of
+the search string.  When the search phrase already has a non-word-char
+at one of these points, no word boundary is required there."
+  :group 'reftex-index-support
+  :type 'boolean)
+
+(defcustom reftex-index-phrases-case-fold-search t
+  "*Non-nil means, searching for index phrases will ignore case."
+  :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
+phrases may match at places where that phrase was already indexed.  In
+particular when indexing an already processed document again, this
+will even be the norm.  When this variable is non-nil, RefTeX checks if
+the match is inside an index macro argument, or if an index macro is directly
+before or after the phrase.  If that is the case, that match will
+be ignored."
+  :group 'reftex-index-support
+  :type 'boolean)
+
+(defcustom reftex-index-phrases-wrap-long-lines nil
+  "*Non-nil means, when indexing from the phrases buffer, wrap lines.
+Inserting indexing commands in a line makes the line longer - often
+so long that it does not fit onto the screen.  When this variable is
+non-nil, newlines will be added as necessary before and/or after the
+indexing command to keep lines short.  However, the matched text
+phrase and its index command will always end up on a single line."
+  :group 'reftex-index-support
+  :type 'boolean)
+
+(defcustom reftex-index-phrases-sort-prefers-entry nil
+  "*Non-nil means when sorting phrase lines, the explicit index entry is used.
+Phrase lines in the phrases buffer contain a search phrase, and
+sorting is normally based on these.  Some phrase lines also have
+an explicit index argument specified.  When this variable is non-nil,
+the index argument will be used for sorting."
+  :group 'reftex-index-support
+  :type 'boolean)
+
+(defcustom reftex-index-phrases-sort-in-blocks t
+  "*Non-nil means, empty and comment lines separate phrase buffer into blocks.
+Sorting will then preserve blocks, so that lines are re-arranged only
+within blocks."
+  :group 'reftex-index-support
+  :type 'boolean)
+
 (defcustom reftex-index-section-letters "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   "The letters which denote sections in the index.
 Usually these are all capital letters.  Don't use any downcase letters.
@@ -1114,7 +1447,7 @@ references (both ways) and index entries is hard-coded.  This variable
 is only to configure additional structures for which crossreference
 viewing can be useful.  Each entry has the structure 
 
-(MACRO-RE SEARCH-RE HIGHLIGHT).
+\(MACRO-RE SEARCH-RE HIGHLIGHT).
 
 MACRO-RE is matched against the macro.  SEARCH-RE is the regexp used
 to search for cross references.  `%s' in this regexp is replaced with
@@ -1122,26 +1455,27 @@ with the macro argument at point.  HIGHLIGHT is an integer indicating
 which subgroup of the match should be highlighted."
   :group 'reftex-viewing-cross-references
   :type '(repeat (group (regexp  :tag "Macro  Regexp  ")
-                       (string  :tag "Search Regexp  ")
-                       (integer :tag "Highlight Group"))))
+                        (string  :tag "Search Regexp  ")
+                        (integer :tag "Highlight Group"))))
 
 (defcustom reftex-auto-view-crossref t
   "*Non-nil means, initially turn automatic viewing of crossref info on.
 Automatic viewing of crossref info normally uses the echo area.
-Whenever point is on the argument of a \\ref or \\cite macro, and no
-other message is being displayed, the echo area will display
-information about that cross reference.  You can also set the variable
-to the symbol `window'.  In this case a small temporary window is
-used for the display.
-This feature can be turned on and of from the menu 
-(Ref->Options)."
+Whenever point is idle for more than `reftex-idle-time' seconds on the
+argument of a \\ref or \\cite macro, and no other message is being
+displayed, the echo area will display information about that cross
+reference.  You can also set the variable to the symbol `window'.  In
+this case a small temporary window is used for the display.
+This feature can be turned on and off from the menu 
+\(Ref->Options)."
   :group 'reftex-viewing-cross-references
   :type '(choice (const :tag "off" nil)
-                (const :tag "in Echo Area" t)
-                (const :tag "in Other Window" window)))
+                 (const :tag "in Echo Area" t)
+                 (const :tag "in Other Window" window)))
 
 (defcustom reftex-idle-time 1.2
-  "*Time (secs) Emacs has to be idle before automatic crossref display is done."
+  "*Time (secs) Emacs has to be idle before automatic crossref display is done.
+Applies also to toc recentering."
   :group 'reftex-viewing-cross-references
   :type 'number)
 
@@ -1204,19 +1538,22 @@ See also `reftex-use-external-file-finders'."
   :type '(repeat (string :tag "Specification")))
 
 (defcustom reftex-file-extensions '(("tex" . (".tex" ".ltx"))
-                                   ("bib" . (".bib")))
+                                    ("bib" . (".bib")))
   "*Association list with file extensions for different file types.
 This is a list of items, each item is like: (TYPE . (DEF-EXT OTHER-EXT ...))
 
 TYPE:       File type like \"bib\" or \"tex\".
 DEF-EXT:    The default extension for that file type, like \".tex\" or \".bib\".
-OTHER-EXT:  Any number of other legal extensions for this file type.
+OTHER-EXT:  Any number of other valid 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")))))
+                       (repeat (string :tag "Extension")))))
 
 (defcustom reftex-search-unrecursed-path-first t
   "*Non-nil means, search all specified directories before trying recursion.
@@ -1241,7 +1578,7 @@ the variables `reftex-texpath-environment-variables' and
   :type 'boolean)
 
 (defcustom reftex-external-file-finders '(("tex" . "kpsewhich -format=.tex %f")
-                                         ("bib" . "kpsewhich -format=.bib %f"))
+                                          ("bib" . "kpsewhich -format=.bib %f"))
   "*Association list with external programs to call for finding files.
 Each entry is a cons cell (TYPE . PROGRAM).
 TYPE is either \"tex\" or \"bib\".  PROGRAM is the external program to use with
@@ -1250,7 +1587,7 @@ Note that these commands will be executed directly, not via a shell.
 Only relevant when `reftex-use-external-file-finders' is non-nil."
   :group 'reftex-finding-files
   :type '(repeat (cons (string :tag "File type")
-                      (string :tag "Program  "))))
+                       (string :tag "Program  "))))
 
 ;; Tuning the parser ----------------------------------------------------
 
@@ -1334,6 +1671,12 @@ information.  When this variable is t,
   :group 'reftex-optimizations-for-large-documents
   :type 'boolean)
 
+(defcustom reftex-parse-file-extension ".rel"
+  "*File extension for the file in which parser information is stored.
+This extension is added to the base name of the master file."
+  :group 'reftex-optimizations-for-large-documents
+  :type 'string)
+
 (defcustom reftex-use-multiple-selection-buffers nil
   "*Non-nil means use a separate selection buffer for each label type.
 These buffers are kept from one selection to the next and need not to be
@@ -1361,6 +1704,7 @@ The value of this variable will only have any effect when
 
 (defgroup reftex-fontification-configurations nil
   "Options concerning the faces used in RefTeX."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'reftex)
 
 (defcustom reftex-use-fonts t
@@ -1404,10 +1748,10 @@ Changing this variable requires to rebuild the selection and *toc* buffers
 to become effective (keys `g' or `r')."
   :group 'reftex-fontification-configurations
   :type '(choice
-         (const :tag "Never" nil)
-         (const :tag "Cursor driven" cursor)
-         (const :tag "Mouse driven" mouse)
-         (const :tag "Mouse and Cursor driven." both)))
+          (const :tag "Never" nil)
+          (const :tag "Cursor driven" cursor)
+          (const :tag "Mouse driven" mouse)
+          (const :tag "Mouse and Cursor driven." both)))
 
 (defcustom reftex-cursor-selected-face 'highlight
   "Face name to highlight cursor selected item in toc and selection buffers.
@@ -1514,17 +1858,17 @@ may require a restart of Emacs in order to become effective."
   :group 'reftex-miscellaneous-configurations
   :group 'LaTeX
   :type '(choice 
-         (const :tag "No plug-ins" nil)
-         (const :tag "All possible plug-ins" t)
-         (list
-          :tag "Individual choice"
-          :value (t t t t t)
-          (boolean :tag "supply label in new sections and environments")
-          (boolean :tag "supply argument for macros like `\\label'     ")
-          (boolean :tag "supply argument for macros like `\\ref'       ")
-          (boolean :tag "supply argument for macros like `\\cite'      ")
-          (boolean :tag "supply argument for macros like `\\index'     ")
-          )))
+          (const :tag "No plug-ins" nil)
+          (const :tag "All possible plug-ins" t)
+          (list
+           :tag "Individual choice"
+           :value (t t t t t)
+           (boolean :tag "supply label in new sections and environments")
+           (boolean :tag "supply argument for macros like `\\label'     ")
+           (boolean :tag "supply argument for macros like `\\ref'       ")
+           (boolean :tag "supply argument for macros like `\\cite'      ")
+           (boolean :tag "supply argument for macros like `\\index'     ")
+           )))
 
 (defcustom reftex-allow-detached-macro-args nil
   "*Non-nil means, allow arguments of macros to be detached by whitespace.
@@ -1544,4 +1888,8 @@ construct:  \\bbb [xxx] {aaa}."
   :group 'reftex-miscellaneous-configurations
   :type 'hook)
 
+
+(provide 'reftex-vars)
+
+;;; arch-tag: 9591ea34-ef39-4431-90b7-c115eaf5e16f
 ;;; reftex-vars.el ends here