]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/reftex-vars.el
Merge branch 'emacs-25-merge'
[gnu-emacs] / lisp / textmodes / reftex-vars.el
index ab085a3085a4e7eb59ec982a860625d743cfbe5b..fcab1367f7d7f49d8f1164e1d2ff9f6517832a71 100644 (file)
@@ -1,6 +1,6 @@
 ;;; reftex-vars.el --- configuration variables for RefTeX
 
-;; Copyright (C) 1997-1999, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
     (supertab    "Supertabular environment"
      (("supertabular" ?t nil nil "\\tablecaption{")))
 
-    (wrapfig     "The wrapfigure environment"
-     (("wrapfigure" ?f nil nil caption)))
+    (wrapfig     "The wrapfig package"
+     (("wrapfigure" ?f nil nil caption)
+      ("wraptable"  ?t nil nil caption)))
 
     (ctable    "The ctable package"
-     (("\\ctable[]{}{}{}" ?t "tab:" "\\ref{%s}" 1 ("table" "Tabelle"))))
+     (("\\ctable[]{}{}{}" ?t "tab:" "~\\ref{%s}" 1 ("table" "Tabelle"))))
 
     (listings  "The listings package"
      (("lstlisting" ?l "lst:" "~\\ref{%s}" nil (regexp "[Ll]isting"))))
 
       ;; The label macro is hard coded, but it *could* be defined like this:
       ;;("\\label{*}" nil nil nil nil)
-      )))
+      ))
+
+    ;; Texinfo
+    (Texinfo "Texinfo default environments" 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.")
@@ -260,6 +264,7 @@ distribution.  Mixed-case symbols are convenience aliases.")
 The file name is expected after the command, either in braces or separated
 by whitespace."
   :group 'reftex-table-of-contents-browser
+  :set 'reftex-set-dirty
   :type '(repeat string))
 
 (defcustom reftex-max-section-depth 12
@@ -330,7 +335,7 @@ 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
+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
@@ -649,7 +654,7 @@ Possible keys are sectioning macro names like `chapter', section levels
                 (string :tag "Prefix"))))
 
 (defcustom reftex-default-context-regexps
-  '((caption       . "\\\\\\(rot\\)?caption\\*?[[{]")
+  '((caption       . "\\\\\\(rot\\|bi\\)?\\(sub\\)?caption\\(box\\)?\\*?[[{]")
     (item          . "\\\\item\\(\\[[^]]*\\]\\)?")
     (eqnarray-like . "\\\\begin{%s}\\|\\\\\\\\")
     (alignat-like  . "\\\\begin{%s}{[0-9]*}\\|\\\\\\\\"))
@@ -734,7 +739,7 @@ And here is the setup for RefTeX:
    \\end.  Here we use \"linguex\" as this name.
 
    (setq reftex-label-alist
-         '((\"linguex\" ?x \"ex:\" \"~\\\\ref{%s}\" nil (\"Example\" \"Ex.\"))))
+         \\='((\"linguex\" ?x \"ex:\" \"~\\\\ref{%s}\" nil (\"Example\" \"Ex.\"))))
 
 2. Write a function to detect the list macros and the determinators as well.
 
@@ -757,7 +762,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)
 
@@ -863,13 +868,17 @@ DOWNCASE    t:   Downcase words before using them."
                          (string :tag ""))
                 (option (boolean :tag "Downcase words          "))))
 
-(defcustom reftex-label-regexps
-  '(;; Normal \\label{foo} labels
-    "\\\\label{\\(?1:[^}]*\\)}"
-    ;; keyvals [..., label = {foo}, ...] forms used by ctable,
-    ;; listings, minted, ...
-    "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
-  "List of regexps matching \\label definitions.
+(if (featurep 'xemacs)
+    ;; XEmacs 21.5 doesn't have explicitly numbered matching groups,
+    ;; so this list mustn't get any more items.
+    (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}"))
+  (defcustom reftex-label-regexps
+    '(;; Normal \\label{foo} labels
+      "\\\\label{\\(?1:[^}]*\\)}"
+      ;; keyvals [..., label = {foo}, ...] forms used by ctable,
+      ;; listings, minted, ...
+      "\\[[^][]\\{0,2000\\}\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
+    "List of regexps matching \\label definitions.
 The default value matches usual \\label{...} definitions and
 keyval style [..., label = {...}, ...] label definitions.  It is
 assumed that the regexp group 1 matches the label text, so you
@@ -878,12 +887,13 @@ have to define it using \\(?1:...\\) when adding new regexps.
 When changed from Lisp, make sure to call
 `reftex-compile-variables' afterwards to make the change
 effective."
-  :set (lambda (symbol value)
-        (set symbol value)
-        (when (fboundp 'reftex-compile-variables)
-          (reftex-compile-variables)))
-  :group 'reftex-defining-label-environments
-  :type '(repeat (regexp :tag "Regular Expression")))
+    :version "25.1"
+    :set (lambda (symbol value)
+          (set symbol value)
+          (when (fboundp 'reftex-compile-variables)
+            (reftex-compile-variables)))
+    :group 'reftex-defining-label-environments
+    :type '(repeat (regexp :tag "Regular Expression"))))
 
 (defcustom reftex-label-ignored-macros-and-environments nil
   "List of macros and environments to be ignored when searching for labels.
@@ -901,6 +911,7 @@ and the functions `TeX-current-macro' and
 `LaTeX-current-environment' are bound.  Also note that this
 feature might slow down the reftex parsing process for large TeX
 files."
+  :version "24.4"
   :group 'reftex-defining-label-environments
   :type '(repeat string))
 
@@ -931,7 +942,7 @@ The function will be called with two arguments, the LABEL and the DEFAULT
 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)
+  :type '(choice (const nil) function))
 
 ;; Label referencing
 
@@ -999,7 +1010,9 @@ This is used to string together whole reference sets, like
     ("Fancyref" "fancyref"
      (("\\fref" ?f) ("\\Fref" ?F)))
     ("Hyperref" "hyperref"
-     (("\\autoref" ?a) ("\\autopageref" ?u))))
+     (("\\autoref" ?a) ("\\autopageref" ?u)))
+    ("Cleveref" "cleveref"
+     (("\\cref" ?c) ("\\Cref" ?C) ("\\cpageref" ?d) ("\\Cpageref" ?D))))
   "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
@@ -1111,7 +1124,7 @@ buffer."
   :group 'reftex)
 
 (defcustom reftex-bibliography-commands
-  '("bibliography" "nobibliography" "setupbibtex\\[.*?database=")
+  '("bibliography" "nobibliography" "setupbibtex\\[.*?database=" "addbibresource")
   "LaTeX commands which specify the BibTeX databases to use with the document."
   :group 'reftex-citation-support
   :type '(repeat string))
@@ -1141,9 +1154,9 @@ path."
   "Sorting of the entries found in BibTeX databases by reftex-citation.
 Possible values:
 nil            Do not sort entries.
-'author        Sort entries by author name.
-'year          Sort entries by increasing year.
-'reverse-year  Sort entries by decreasing year."
+`author'       Sort entries by author name.
+`year'         Sort entries by increasing year.
+`reverse-year' Sort entries by decreasing year."
   :group 'reftex-citation-support
   :type '(choice (const :tag "not" nil)
                  (const :tag "by author" author)
@@ -1193,7 +1206,7 @@ strings.
 `reftex-cite-format' directly yourself or set it to the SYMBOL of one of
 the predefined styles.  The predefined symbols are those which have an
 association in the constant `reftex-cite-format-builtin'.
-E.g.: (setq reftex-cite-format 'natbib)"
+E.g.: (setq reftex-cite-format \\='natbib)"
   :group 'reftex-citation-support
   :type
   `(choice
@@ -1439,7 +1452,7 @@ 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)
+          (const :tag  "last used " last)
           (string :tag "index tag " "idx")))
 
 (defcustom reftex-index-math-format "$%s$"
@@ -1979,7 +1992,8 @@ 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 users `C-c letter' map."
+These extra bindings are located in the users `C-c letter' map.
+Note that this variable needs to be set before reftex is loaded."
   :group 'reftex-miscellaneous-configurations
   :type 'boolean)