]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/reftex-vars.el
Merge from emacs-24; up to 2012-12-17T11:17:34Z!rgm@gnu.org
[gnu-emacs] / lisp / textmodes / reftex-vars.el
index 98135b7ce24fa1fb287d6146cbdbad1d58966f14..2a5c9c55866db32bc549fb402ecd15bb893aa757 100644 (file)
@@ -1,11 +1,9 @@
 ;;; reftex-vars.el --- configuration variables for RefTeX
 
-;; Copyright (C) 1997-1999, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2001-2013 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
-;; Version: 4.31
-;; Package: reftex
 
 ;; This file is part of GNU Emacs.
 
     (wrapfig     "The wrapfigure environment"
      (("wrapfigure" ?f nil nil caption)))
 
+    (ctable    "The ctable package"
+     (("\\ctable[]{}{}{}" ?t "tab:" "\\ref{%s}" 1 ("table" "Tabelle"))))
+
+    (listings  "The listings package"
+     (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
+
+    (minted    "The minted package"
+     (("minted" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
+
     ;; The LaTeX core stuff
     (LaTeX       "LaTeX default environments"
      (("section"   ?s "%S" "~\\ref{%s}" (nil . t)
 
       ;; The label macro is hard coded, but it *could* be defined like this:
       ;;("\\label{*}" nil nil nil nil)
-      ))
-
-    )
+      )))
   "The default label environment descriptions.
 Lower-case symbols correspond to a style file of the same name in the LaTeX
 distribution.  Mixed-case symbols are convenience aliases.")
@@ -200,6 +205,11 @@ distribution.  Mixed-case symbols are convenience aliases.")
       (?p    . "(%2a %y\\nocite{%l})")))
     (locally     "Full info in parenthesis"
      "(%2a %y, %j %v, %P, %e: %b, %u, %s %<)")
+    (context
+     "ConTeXt bib module"
+     ((?\C-m . "\\cite[%l]")
+      (?s    . "\\cite[][%l]")
+      (?n    . "\\nocite[%l]")))
     )
   "Builtin versions of the citation format.
 The following conventions are valid for all alist entries:
@@ -232,7 +242,7 @@ distribution.  Mixed-case symbols are convenience aliases.")
   "LaTeX label and citation support."
   :tag "RefTeX"
   :link '(url-link :tag "Home Page"
-                   "http://staff.science.uva.nl/~dominik/Tools/reftex/")
+                   "http://www.gnu.org/software/auctex/reftex.html")
   :link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el")
   :link '(custom-manual "(reftex)Top")
   :prefix "reftex-"
@@ -254,8 +264,8 @@ by whitespace."
 
 (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."
+The default in standard LaTeX is 7, but there are packages for
+which this needs to be larger."
   :group 'reftex-table-of-contents-browser
   :type 'integer)
 
@@ -294,7 +304,7 @@ select the nearest entry with the correct new level."
                  (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.
+  "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."
@@ -302,7 +312,7 @@ This variable can be changed from within the *toc* buffer with the `t' key."
   :type 'integer)
 
 (defcustom reftex-part-resets-chapter nil
-  "*Non-nil means, \\part is like any other sectioning command.
+  "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
@@ -312,7 +322,7 @@ and also do not show up in chapter numbers."
 
 
 (defcustom reftex-auto-recenter-toc 'frame
-  "*Non-nil means, turn automatic recentering of *TOC* window on.
+  "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.
@@ -322,7 +332,7 @@ 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
+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.
 
@@ -335,12 +345,12 @@ This feature can be turned on and off from the menu
           (const :tag "in dedicated frame only" frame)))
 
 (defcustom reftex-toc-split-windows-horizontally nil
-  "*Non-nil means, create TOC window by splitting window horizontally."
+  "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.
+  "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)
@@ -349,7 +359,7 @@ See also `reftex-toc-split-windows-horizontally'."
   "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.
+  "Non-nil means, split the selected window to display the *toc* buffer.
 This helps to keep the window configuration, but makes the *toc* small.
 When nil, all other windows except the selected one will be deleted, so
 that the *toc* window fills half the frame."
@@ -357,27 +367,27 @@ that the *toc* window fills half the frame."
   :type 'boolean)
 
 (defcustom reftex-toc-include-file-boundaries nil
-  "*Non-nil means, include file boundaries in *toc* buffer.
+  "Non-nil means, include file boundaries in *toc* buffer.
 This flag can be toggled from within the *toc* buffer with the `F' key."
   :group 'reftex-table-of-contents-browser
   :type 'boolean)
 
 (defcustom reftex-toc-include-labels nil
-  "*Non-nil means, include labels in *toc* buffer.
+  "Non-nil means, include labels in *toc* buffer.
 This flag can be toggled from within the *toc* buffer with the `l' key."
   :group 'reftex-table-of-contents-browser
   :type 'boolean)
 
 (defcustom reftex-toc-include-index-entries nil
-  "*Non-nil means, include index entries in *toc* buffer.
+  "Non-nil means, include index entries in *toc* buffer.
 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
+  "Non-nil means, promotion/demotion commands first prompt for confirmation.
+If nil, the command is executed immediately.  If 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
@@ -386,22 +396,22 @@ changed."
           (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.
+  "Non-nil means, include context with labels in the *toc* buffer.
 Context will only be shown when labels are visible as well.
 This flag can be toggled from within the *toc* buffer with the `c' key."
   :group 'reftex-table-of-contents-browser
   :type 'boolean)
 
 (defcustom reftex-toc-follow-mode nil
-  "*Non-nil means, point in *toc* buffer will cause other window to follow.
+  "Non-nil means, point in *toc* buffer will cause other window to follow.
 The other window will show the corresponding part of the document.
 This flag can be toggled from within the *toc* buffer with the `f' key."
   :group 'reftex-table-of-contents-browser
   :type 'boolean)
 
 (defcustom reftex-revisit-to-follow nil
-  "*Non-nil means, follow-mode will revisit files if necessary.
-When nil, follow-mode will be suspended for stuff in unvisited files."
+  "Non-nil means, follow-mode will revisit files if necessary.
+If nil, follow-mode will be suspended for stuff in unvisited files."
   :group 'reftex-table-of-contents-browser
   :group 'reftex-referencing-labels
   :type 'boolean)
@@ -423,7 +433,8 @@ 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
+           listings minted ctable 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
@@ -444,8 +455,8 @@ of options."
 (defcustom reftex-label-alist nil
   "Alist with information on environments for \\label-\\ref use.
 
-This docstring is easier to understand after reading the configuration
-examples in `reftex.el'.  Looking at the builtin defaults in the constant
+This doc string is easier to understand after reading the configuration
+examples in the manual.  Looking at the builtin defaults in the constant
 `reftex-label-alist-builtin' may also be instructive.
 
 Set this variable to define additions and changes to the default.  The only
@@ -473,12 +484,11 @@ ENV-OR-MACRO
     Special names: `section' for section labels, `any' to define a group
     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
-    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
-    starts.  See the Info documentation for an example.
+    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 an
+    argument BOUND and limit backward searches to this value.  It should
+    return either nil or the position where the special environment starts.
+    See the Info documentation for an example.
 
     Finally this may also be nil if the entry is only meant to change
     some settings associated with the type indicator character (see below).
@@ -492,7 +502,7 @@ TYPE-KEY
     `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 reminder of this entry is ignored.
+    the remainder of this entry is ignored.
 
 LABEL-PREFIX
     Label prefix string, like \"tab:\".
@@ -508,8 +518,8 @@ LABEL-PREFIX
     Example: In a file `intro.tex', \"eq:%f:\" will become \"eq:intro:\").
 
 REFERENCE-FORMAT
-    Format string for reference insert in buffer.  `%s' will be replaced by
-    the label.
+    Format string for reference insertion in buffer.  `%s' will be replaced
+    by the label.
     When the format starts with `~', the `~' will only be inserted if
     there is not already a whitespace before point.
 
@@ -525,7 +535,7 @@ CONTEXT-METHOD
     - If an integer, use the nth argument of the macro.  As a special case,
       1000 means to get text after the last macro argument.
     - If a string, use as regexp to search *backward* from the label.  Context
-      is then the text following the end of the match.  E.g. putting this to
+      is then the text following the end of the match.  E.g. setting this to
       \"\\\\\\\\caption[[{]\" will use the caption in a figure or table
       environment.
       \"\\\\\\\\begin{eqnarray}\\\\|\\\\\\\\\\\\\\\\\" works for eqnarrays.
@@ -576,7 +586,7 @@ will use
 Any list entry may also be a symbol.  If that has an association in
 `reftex-label-alist-builtin', the cddr of that association is spliced into the
 list.  However, builtin defaults should normally be set with the variable
-`reftex-default-label-alist-entries."
+`reftex-default-label-alist-entries'."
   :group 'reftex-defining-label-environments
   :set 'reftex-set-dirty
   :type
@@ -747,8 +757,7 @@ And here is the setup for RefTeX:
 
 3. Tell RefTeX to use this function
 
-   (setq reftex-special-environment-functions '(my-detect-linguex-list))
-"
+   (setq reftex-special-environment-functions '(my-detect-linguex-list))"
   :group 'reftex-defining-label-environments
   :type 'hook)
 
@@ -812,11 +821,13 @@ RefTeX's default function uses the variable `reftex-derive-label-parameters'."
   :type 'symbol)
 
 (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 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'."
+  "Filter function to convert a string to ASCII.
+The function is used to 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 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
   :type 'symbol)
 
@@ -939,36 +950,90 @@ This is used to string together whole reference sets, like
   :group 'reftex-referencing-labels
   :type '(repeat (cons (character) (string))))
 
+(defcustom reftex-ref-style-alist
+  '(("Default" t
+     (("\\ref" ?\C-m) ("\\pageref" ?p)))
+    ("Varioref" "varioref"
+     (("\\vref" ?v) ("\\vpageref" ?g) ("\\Vref" ?V) ("\\Ref" ?R)))
+    ("Fancyref" "fancyref"
+     (("\\fref" ?f) ("\\Fref" ?F)))
+    ("Hyperref" "hyperref"
+     (("\\autoref" ?a) ("\\autopageref" ?u))))
+  "Alist of reference styles.
+Each element is a list of the style name, the name of the LaTeX
+package associated with the style or t for any package, and an
+alist of macros where the first entry of each item is the
+reference macro and the second a key for selecting the macro when
+the macro type is being prompted for.  (See also
+`reftex-ref-macro-prompt'.)  The keys, represented as characters,
+have to be unique."
+  :group 'reftex-referencing-labels
+  :version "24.3"
+  :type '(alist :key-type (string :tag "Style name")
+               :value-type (group (choice :tag "Package"
+                                          (const :tag "Any package" t)
+                                          (string :tag "Name"))
+                                  (repeat :tag "Macros"
+                                          (group (string :tag "Macro")
+                                                 (character :tag "Key"))))))
+
+(defcustom reftex-ref-macro-prompt t
+  "If non-nil, `reftex-reference' prompts for the reference macro."
+  :group 'reftex-referencing-labels
+  :version "24.3"
+  :type 'boolean)
+
 (defcustom reftex-vref-is-default nil
-  "*Non-nil means, the varioref macro \\vref is used as default.
-In the selection buffer, the `v' key toggles the reference macro between
-`\\ref' and `\\vref'.  The value of this variable determines the default
-which is active when entering the selection process.
-Instead of nil or t, this may also be a string of type letters indicating
-the label types for which it should be true."
+  "Non-nil means, the varioref reference style is used as default.
+The value of this variable determines the default which is active
+when entering the selection process.  Instead of nil or t, this
+may also be a string of type letters indicating the label types
+for which it should be true.
+
+This variable is obsolete, use `reftex-ref-style-default-list'
+instead."
   :group  'reftex-referencing-labels
   :type `(choice :tag "\\vref is default macro" ,@reftex-tmp))
 ;;;###autoload(put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
 
 (defcustom reftex-fref-is-default nil
-  "*Non-nil means, the fancyref macro \\fref is used as default.
-In the selection buffer, the `V' key toggles the reference macro between
-`\\ref', `\\fref' and `\\Fref'.  The value of this variable determines
-the default which is active when entering the selection process.
-Instead of nil or t, this may also be a string of type letters indicating
-the label types for which it should be true."
+  "Non-nil means, the fancyref reference style is used as default.
+The value of this variable determines the default which is active
+when entering the selection process.  Instead of nil or t, this
+may also be a string of type letters indicating the label types
+for which it should be true.
+
+This variable is obsolete, use `reftex-ref-style-default-list'
+instead."
   :group  'reftex-referencing-labels
   :type `(choice :tag "\\fref is default macro" ,@reftex-tmp))
 ;;;###autoload(put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
 
+(defcustom reftex-ref-style-default-list '("Default")
+  "List of reference styles to be activated by default.
+The order is significant and controls the order in which macros
+can be cycled in the buffer for selecting a label.  The entries
+in the list have to match the respective reference style names
+used in the variable `reftex-ref-style-alist'."
+  :group 'reftex-referencing-labels
+  :version "24.3"
+  :type `(set ,@(mapcar (lambda (x) (list 'const (car x)))
+                       reftex-ref-style-alist)))
+
+;; Compatibility with obsolete variables.
+(when reftex-vref-is-default
+  (add-to-list 'reftex-ref-style-default-list "Varioref"))
+(when reftex-fref-is-default
+  (add-to-list 'reftex-ref-style-default-list "Fancyref"))
+
 (defcustom reftex-level-indent 2
-  "*Number of spaces to be used for indentation per section level."
+  "Number of spaces to be used for indentation per section level."
   :group 'reftex-referencing-labels
   :type 'integer)
 ;;;###autoload(put 'reftex-level-indent 'safe-local-variable 'integerp)
 
 (defcustom reftex-guess-label-type t
-  "*Non-nil means, `reftex-reference' will try to guess the label type.
+  "Non-nil means, `reftex-reference' will try to guess the label type.
 To do that, RefTeX will look at the word before the cursor and compare it with
 the words given in `reftex-label-alist'.  When it finds a match, RefTeX will
 immediately offer the correct label menu - otherwise it will prompt you for
@@ -979,19 +1044,22 @@ a label type.  If you set this variable to nil, RefTeX will always prompt."
 
 (defcustom reftex-format-ref-function nil
   "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'
-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
-string to insert into the buffer."
+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
+e.g. `\\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 three arguments, the LABEL, the
+DEFAULT FORMAT, which normally is `~\\ref{%s}' and the REFERENCE
+STYLE.  The function should return the string to insert into the
+buffer."
   :group 'reftex-referencing-labels
-  :type 'function)
+  :type '(choice (const nil) function))
 
 (defcustom reftex-select-label-mode-hook nil
-  "Mode hook for reftex-select-label-mode."
+  "Mode hook for `reftex-select-label-mode'."
   :group 'reftex-referencing-labels
   :type 'hook)
 
@@ -1001,7 +1069,8 @@ string to insert into the buffer."
   "Support for referencing bibliographic data with BibTeX."
   :group 'reftex)
 
-(defcustom reftex-bibliography-commands '("bibliography" "nobibliography")
+(defcustom reftex-bibliography-commands
+  '("bibliography" "nobibliography" "setupbibtex\\[.*?database=")
   "LaTeX commands which specify the BibTeX databases to use with the document."
   :group 'reftex-citation-support
   :type '(repeat string))
@@ -1009,7 +1078,7 @@ string to insert into the buffer."
 
 (defvar reftex-bibfile-ignore-list nil) ; compatibility
 (defcustom reftex-bibfile-ignore-regexps nil
-  "*List of regular expressions to exclude files in \\bibliography{..}.
+  "List of regular expressions to exclude files in \\bibliography{..}.
 File names matched by these regexps will not be parsed by RefTeX.
 Intended for files which contain only `@string' macro definitions and the
 like, which are ignored by RefTeX anyway."
@@ -1018,7 +1087,7 @@ like, which are ignored by RefTeX anyway."
   :type '(repeat (regexp)))
 
 (defcustom reftex-default-bibliography nil
-  "*List of BibTeX database files which should be used if none are specified.
+  "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,
 RefTeX will scan these files instead.  Intended for using `reftex-citation'
@@ -1028,7 +1097,7 @@ path."
   :type '(repeat (file)))
 
 (defcustom reftex-sort-bibtex-matches 'reverse-year
-  "*Sorting of the entries found in BibTeX databases by reftex-citation.
+  "Sorting of the entries found in BibTeX databases by reftex-citation.
 Possible values:
 nil            Do not sort entries.
 'author        Sort entries by author name.
@@ -1041,7 +1110,7 @@ nil            Do not sort entries.
                  (const :tag "by year, reversed" reverse-year)))
 
 (defcustom reftex-cite-format 'default
-  "*The format of citations to be inserted into the buffer.
+  "The format of citations to be inserted into the buffer.
 It can be a string or an alist or a symbol.  In the simplest case this
 is just the string \"\\cite{%l}\", which is also the default.  See the
 definition of `reftex-cite-format-builtin' for more complex examples.
@@ -1056,12 +1125,12 @@ In the format, the following percent escapes will be expanded.
 %e   Works like %a, but on list of editor names. (%2e and %E work a well)
 
 It is also possible to access all other BibTeX database fields:
-%b booktitle     %c chapter        %d edition    %h howpublished
-%i institution   %j journal        %k key        %m month
-%n number        %o organization   %p pages      %P first page
-%r address       %s school         %u publisher  %t title
-%v volume        %y year
-%B booktitle, abbreviated          %T title, abbreviated
+%b booktitle     %c chapter   %d edition      %h howpublished
+%i institution   %j journal   %k key          %m month
+%n number        %N note      %o organization %p pages
+%P first page    %r address   %s school       %u publisher
+%U url           %t title     %v volume       %y year
+%B booktitle, abbreviated     %T title, abbreviated
 
 Usually, only %l is needed.  The other stuff is mainly for the echo area
 display, and for (setq reftex-comment-citations t).
@@ -1105,8 +1174,8 @@ E.g.: (setq reftex-cite-format 'natbib)"
                   (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
+  "Non-nil means, prompt for empty optional arguments in cite macros.
+When an entry in `reftex-cite-format' is given with square brackets to
 indicate optional arguments (for example \\cite[][]{%l}), RefTeX can
 prompt for values.  Possible values are:
 
@@ -1123,7 +1192,7 @@ the buffer.  See `reftex-cite-cleanup-optional-args'."
           (const :tag "Never" nil)))
 
 (defcustom reftex-cite-cleanup-optional-args t
-  "*Non-nil means, remove unnecessary empty optional arguments in cite macros.
+  "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
@@ -1141,7 +1210,7 @@ can be turned off."
   :type 'boolean)
 
 (defcustom reftex-comment-citations nil
-  "*Non-nil means add a comment for each citation describing the full entry.
+  "Non-nil means add a comment for each citation describing the full entry.
 The comment is formatted according to `reftex-cite-comment-format'."
   :group 'reftex-citation-support
   :type 'boolean)
@@ -1181,13 +1250,31 @@ The function will be called with two arguments, the CITATION KEY and the
 DEFAULT FORMAT, which is taken from `reftex-cite-format'.  The function
 should return the string to insert into the buffer."
   :group 'reftex-citation-support
-  :type 'function)
+  :type '(choice (const nil) function))
 
 (defcustom reftex-select-bib-mode-hook nil
   "Mode hook for reftex-select-bib-mode."
   :group 'reftex-citation-support
   :type 'hook)
 
+(defcustom reftex-cite-key-separator ","
+  "String to be used for separating several keys in a \\cite macro."
+  :group 'reftex-citation-support
+  :version "24.3"
+  :type 'string)
+
+(defcustom reftex-create-bibtex-header nil
+  "Header to insert in BibTeX files generated by RefTeX."
+  :group 'reftex-citation-support
+  :version "24.3"
+  :type '(choice (const :tag "No header" nil) string))
+
+(defcustom reftex-create-bibtex-footer nil
+  "Footer to insert in BibTeX files generated by RefTeX."
+  :group 'reftex-citation-support
+  :version "24.3"
+  :type '(choice (const :tag "No footer" nil) string))
+
 ;; Index Support Configuration
 
 (defgroup reftex-index-support nil
@@ -1195,7 +1282,7 @@ should return the string to insert into the buffer."
   :group 'reftex)
 
 (defcustom reftex-support-index t
-  "*Non-nil means, index entries are parsed as well.
+  "Non-nil means, index entries are parsed as well.
 Index support is resource intensive and the internal structure holding the
 parsed information can become quite big.  Therefore it can be turned off.
 When this is nil and you execute a command which requires index support,
@@ -1215,7 +1302,9 @@ These correspond to the makeindex keywords LEVEL ENCAP ACTUAL QUOTE ESCAPE."
           (string :tag "ESCAPE char     ")))
 
 (defcustom reftex-index-macros nil
-  "Macros which define index entries.  The structure is
+  "Macros which define index entries.
+
+The structure is
 
 \(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT)
 
@@ -1354,7 +1443,7 @@ has higher priority than this logical `or'."
   :type 'regexp)
 
 (defcustom reftex-index-phrases-search-whole-words t
-  "*Non-nil means phrases search will look for whole words, not subwords.
+  "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."
@@ -1362,7 +1451,7 @@ at one of these points, no word boundary is required there."
   :type 'boolean)
 
 (defcustom reftex-index-phrases-case-fold-search t
-  "*Non-nil means, searching for index phrases will ignore case."
+  "Non-nil means, searching for index phrases will ignore case."
   :group 'reftex-index-support
   :type 'boolean)
 
@@ -1375,7 +1464,7 @@ If the function returns nil, the current match is skipped."
           (function)))
 
 (defcustom reftex-index-phrases-skip-indexed-matches nil
-  "*Non-nil means, skip matches which appear to be indexed already.
+  "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
@@ -1387,7 +1476,7 @@ be ignored."
   :type 'boolean)
 
 (defcustom reftex-index-phrases-wrap-long-lines nil
-  "*Non-nil means, when indexing from the phrases buffer, wrap lines.
+  "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
@@ -1397,7 +1486,7 @@ phrase and its index command will always end up on a single line."
   :type 'boolean)
 
 (defcustom reftex-index-phrases-sort-prefers-entry nil
-  "*Non-nil means when sorting phrase lines, the explicit index entry is used.
+  "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,
@@ -1406,7 +1495,7 @@ the index argument will be used for sorting."
   :type 'boolean)
 
 (defcustom reftex-index-phrases-sort-in-blocks t
-  "*Non-nil means, empty and comment lines separate phrase buffer into blocks.
+  "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
@@ -1425,13 +1514,13 @@ to that section."
   :type '(string :tag "Capital letters"))
 
 (defcustom reftex-index-include-context nil
-  "*Non-nil means, display the index definition context in the index buffer.
+  "Non-nil means, display the index definition context in the index buffer.
 This flag may also be toggled from the index buffer with the `c' key."
   :group 'reftex-index-support
   :type 'boolean)
 
 (defcustom reftex-index-follow-mode nil
-  "*Non-nil means, point in *Index* buffer will cause other window to follow.
+  "Non-nil means, point in *Index* buffer will cause other window to follow.
 The other window will show the corresponding part of the document.
 This flag can be toggled from within the *Index* buffer with the `f' key."
   :group 'reftex-table-of-contents-browser
@@ -1448,7 +1537,7 @@ This flag can be toggled from within the *Index* buffer with the `f' key."
 This is used when `reftex-view-crossref' is called with point in an
 argument of a macro.  Note that crossref viewing for citations,
 references (both ways) and index entries is hard-coded.  This variable
-is only to configure additional structures for which crossreference
+is only to configure additional structures for which cross-reference
 viewing can be useful.  Each entry has the structure
 
 \(MACRO-RE SEARCH-RE HIGHLIGHT).
@@ -1463,7 +1552,7 @@ which subgroup of the match should be highlighted."
                         (integer :tag "Highlight Group"))))
 
 (defcustom reftex-auto-view-crossref t
-  "*Non-nil means, initially turn automatic viewing of crossref info on.
+  "Non-nil means, initially turn automatic viewing of crossref info on.
 Automatic viewing of crossref info normally uses the echo area.
 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
@@ -1478,28 +1567,30 @@ This feature can be turned on and off from the menu
                  (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)
 
 (defcustom reftex-revisit-to-echo nil
-  "*Non-nil means, automatic citation display will revisit files if necessary.
+  "Non-nil means, automatic citation display will revisit files if necessary.
 When nil, citation display in echo area will only be active for cached
 entries and for BibTeX database files with live associated buffers."
   :group 'reftex-viewing-cross-references
   :type 'boolean)
 
 (defcustom reftex-cache-cite-echo t
-  "*Non-nil means, the information displayed in the echo area for cite macros
-is cached and even saved along with the parsing information.  The cache
-survives document scans.  In order to clear it, use M-x reftex-reset-mode."
+  "Non-nil means, echoed information for cite macros is cached.
+The information displayed in the echo area for cite macros is
+cached and even saved along with the parsing information.  The
+cache survives document scans.  In order to clear it, use M-x
+reftex-reset-mode <RET>."
   :group 'reftex-viewing-cross-references
   :type 'boolean)
 
 (defcustom reftex-display-copied-context-hook nil
-  "Normal Hook which is run before context is displayed anywhere.  Designed
-for X-Symbol, but may have other uses as well."
+  "Normal hook which is run before context is displayed anywhere.
+Designed for X-Symbol, but may have other uses as well."
   :group 'reftex-viewing-cross-references
   :group 'reftex-referencing-labels
   :type 'hook)
@@ -1511,7 +1602,7 @@ for X-Symbol, but may have other uses as well."
   :group 'reftex)
 
 (defcustom reftex-texpath-environment-variables '("TEXINPUTS")
-  "*List of specifications how to retrieve the search path for TeX files.
+  "List of specifications how to retrieve the search path for TeX files.
 Several entries are possible.
 - If an element is the name of an environment variable, its content is used.
 - If an element starts with an exclamation mark, it is used as a command
@@ -1526,7 +1617,7 @@ See also `reftex-use-external-file-finders'."
   :type '(repeat (string :tag "Specification")))
 
 (defcustom reftex-bibpath-environment-variables '("BIBINPUTS" "TEXBIB")
-  "*List of specifications how to retrieve search path for .bib database files.
+  "List of specifications how to retrieve search path for .bib database files.
 Several entries are possible.
 - If an element is the name of an environment variable, its content is used.
 - If an element starts with an exclamation mark, it is used as a command
@@ -1543,7 +1634,7 @@ See also `reftex-use-external-file-finders'."
 
 (defcustom reftex-file-extensions '(("tex" . (".tex" ".ltx"))
                                     ("bib" . (".bib")))
-  "*Association list with file extensions for different file types.
+  "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\".
@@ -1572,7 +1663,7 @@ Note that if you are using external file finders, this option has no effect."
   :type 'boolean)
 
 (defcustom reftex-search-unrecursed-path-first t
-  "*Non-nil means, search all specified directories before trying recursion.
+  "Non-nil means, search all specified directories before trying recursion.
 Thus, in a path \".//:/tex/\", search first \"./\", then \"/tex/\" and then
 all subdirectories of \"./\".  If this option is nil, the subdirectories of
 \"./\" are searched before \"/tex/\".  This is mainly for speed - most of the
@@ -1583,7 +1674,7 @@ in wrong sequence."
   :type 'boolean)
 
 (defcustom reftex-use-external-file-finders nil
-  "*Non-nil means, use external programs to find files.
+  "Non-nil means, use external programs to find files.
 Normally, RefTeX searches the paths given in the environment variables
 TEXINPUTS and BIBINPUTS to find TeX files and BibTeX database files.
 With this option turned on, it calls an external program specified in the
@@ -1595,7 +1686,7 @@ the variables `reftex-texpath-environment-variables' and
 
 (defcustom reftex-external-file-finders '(("tex" . "kpsewhich -format=.tex %f")
                                           ("bib" . "kpsewhich -format=.bib %f"))
-  "*Association list with external programs to call for finding files.
+  "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
 any arguments.  %f will be replaced by the name of the file to be found.
@@ -1612,7 +1703,7 @@ Only relevant when `reftex-use-external-file-finders' is non-nil."
   :group 'reftex)
 
 (defcustom reftex-keep-temporary-buffers 1
-  "*Non-nil means, keep buffers created for parsing and lookup.
+  "Non-nil means, keep buffers created for parsing and lookup.
 RefTeX sometimes needs to visit files related to the current document.
 We distinguish files visited for
 PARSING: Parts of a multifile document loaded when (re)-parsing the document.
@@ -1637,7 +1728,7 @@ upon the variable `reftex-initialize-temporary-buffers'."
           (const :tag "Keep lookup buffers only" 1)))
 
 (defcustom reftex-initialize-temporary-buffers nil
-  "*Non-nil means do initializations even when visiting file temporarily.
+  "Non-nil means do initializations even when visiting file temporarily.
 When nil, RefTeX may turn off find-file hooks and other stuff to briefly
 visit a file.
 When t, the full default initializations are done (find-file-hook etc.).
@@ -1651,14 +1742,14 @@ do a minimal initialization."
            (function-item))))
 
 (defcustom reftex-no-include-regexps '("\\.pstex_t\\'")
-  "*List of regular expressions to exclude certain input files from parsing.
+  "List of regular expressions to exclude certain input files from parsing.
 If the name of a file included via \\include or \\input is matched by any
 of the regular expressions in this list, that file is not parsed by RefTeX."
   :group 'reftex-optimizations-for-large-documents
   :type '(repeat (regexp)))
 
 (defcustom reftex-enable-partial-scans nil
-  "*Non-nil means, re-parse only 1 file when asked to re-parse.
+  "Non-nil means, re-parse only 1 file when asked to re-parse.
 Re-parsing is normally requested with a `C-u' prefix to many RefTeX commands,
 or with the `r' key in menus.  When this option is t in a multifile document,
 we will only parse the current buffer, or the file associated with the label
@@ -1669,7 +1760,7 @@ in menus."
   :type 'boolean)
 
 (defcustom reftex-allow-automatic-rescan t
-  "*Non-nil means, RefTeX may rescan the document when this seems necessary.
+  "Non-nil means, RefTeX may rescan the document when this seems necessary.
 Currently this applies only to rescanning after label insertion, when
 the new label cannot be inserted correctly into the internal label
 list."
@@ -1677,24 +1768,24 @@ list."
   :type 'boolean)
 
 (defcustom reftex-save-parse-info nil
-  "*Non-nil means, save information gathered with parsing in a file.
+  "Non-nil means, save information gathered with parsing in a file.
 The file MASTER.rel in the same directory as MASTER.tex is used to save the
 information.  When this variable is t,
 - accessing the parsing information for the first time in an editing session
   will read that file (if available) instead of parsing the document.
-- exiting Emacs or killing a buffer in reftex-mode will cause a new version
+- exiting Emacs or killing a buffer in `reftex-mode' will cause a new version
   of the file to be written."
   :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.
+  "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.
+  "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
 created for each use - so the menu generally comes up faster.  The
 selection buffers will be erased (and therefore updated) automatically
@@ -1705,7 +1796,7 @@ when new labels in its category are added.  See the variable
   :type 'boolean)
 
 (defcustom reftex-auto-update-selection-buffers t
-  "*Non-nil means, selection buffers will be updated automatically.
+  "Non-nil means, selection buffers will be updated automatically.
 When a new label is defined with `reftex-label', all selection buffers
 associated with that label category are emptied, in order to force an
 update upon next use.  When nil, the buffers are left alone and have to be
@@ -1724,14 +1815,14 @@ The value of this variable will only have any effect when
   :group 'reftex)
 
 (defcustom reftex-use-fonts t
-  "*Non-nil means, use fonts in *toc* and selection buffers.
+  "Non-nil means, use fonts in *toc* and selection buffers.
 Font-lock must be loaded as well to actually get fontified display.
 When changing this option, a rescan may be necessary to activate the change."
   :group 'reftex-fontification-configurations
   :type 'boolean)
 
 (defcustom reftex-refontify-context 1
-  "*Non-nil means, re-fontify the context in the label menu with font-lock.
+  "Non-nil means, re-fontify the context in the label menu with font-lock.
 This slightly slows down the creation of the label menu.  It is only necessary
 when you definitely want the context fontified.
 
@@ -1748,7 +1839,7 @@ The option is ignored when `reftex-use-fonts' is nil."
           (const :tag "When necessary" 1)))
 
 (defcustom reftex-highlight-selection 'cursor
-  "*Non-nil mean, highlight selected text in selection and *toc* buffers.
+  "Non-nil mean, highlight selected text in selection and *toc* buffers.
 Normally, the text near the cursor is the selected text, and it is
 highlighted.  This is the entry most keys in the selection and *toc*
 buffers act on.  However, if you mainly use the mouse to select an
@@ -1847,22 +1938,13 @@ symbol indicating in what context the hook is called."
 
 (defcustom reftex-extra-bindings nil
   "Non-nil means, make additional key bindings on startup.
-These extra bindings are located in the
-`reftex-extra-bindings-map' map, bound to
-`reftex-extra-bindings-prefix'."
-  :group 'reftex-miscellaneous-configurations
-  :type 'boolean)
-
-;; below, default is C-c C-y because it is free in LaTeX mode.
-(defcustom reftex-extra-bindings-prefix "\C-c\C-y"
-  "When `reftex-extra-bindings' is set to non-nil, use extra
-bindings with this prefix bound to `reftex-extra-bindings-map'."
+These extra bindings are located in the users `C-c letter' map."
   :group 'reftex-miscellaneous-configurations
   :type 'boolean)
 
 (defcustom reftex-plug-into-AUCTeX nil
-  "*Plug-in flags for AUCTeX interface.
-This variable is a list of 4 boolean flags.  When a flag is non-nil,
+  "Plug-in flags for AUCTeX interface.
+This variable is a list of 5 boolean flags.  When a flag is non-nil,
 RefTeX will
 
   - supply labels in new sections and environments  (flag 1)
@@ -1892,11 +1974,10 @@ may require a restart of Emacs in order to become effective."
            (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'     ")
-           )))
+           (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.
+  "Non-nil means, allow arguments of macros to be detached by whitespace.
 When this is t, `aaa' will be considered as argument of \\bb in the following
 construct:  \\bbb [xxx] {aaa}."
   :group 'reftex-miscellaneous-configurations