summaryrefslogtreecommitdiff
path: root/lisp/textmodes/reftex-vars.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/reftex-vars.el')
-rw-r--r--lisp/textmodes/reftex-vars.el124
1 files changed, 60 insertions, 64 deletions
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 1b29eafabf7..96065ee69e1 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -1,4 +1,4 @@
-;;; reftex-vars.el --- configuration variables for RefTeX
+;;; reftex-vars.el --- configuration variables for RefTeX -*- lexical-binding: t; -*-
;; Copyright (C) 1997-1999, 2001-2021 Free Software Foundation, Inc.
@@ -121,7 +121,7 @@
(regexp "tables?" "tab\\." "Tabellen?"))
("table*" ?t nil nil caption)
- ("\\footnote[]{}" ?n "fn:" "~\\ref{%s}" 2
+ ("\\footnote[]{}" ?n "fn:" "~\\footref{%s}" 2
(regexp "footnotes?" "Fussnoten?"))
("any" ?\ " " "~\\ref{%s}" nil)
@@ -282,7 +282,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
+ :set #'reftex-set-dirty
:type '(repeat string))
(defcustom reftex-max-section-depth 12
@@ -319,7 +319,7 @@ 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
+ :set #'reftex-set-dirty
:type '(repeat
(cons (string :tag "sectioning macro" "")
(choice
@@ -463,7 +463,7 @@ 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
of options."
:group 'reftex-defining-label-environments
- :set 'reftex-set-dirty
+ :set #'reftex-set-dirty
:type `(set
:indent 4
:inline t
@@ -611,7 +611,7 @@ Any list entry may also be a symbol. If that has an association in
list. However, builtin defaults should normally be set with the variable
`reftex-default-label-alist-entries'."
:group 'reftex-defining-label-environments
- :set 'reftex-set-dirty
+ :set #'reftex-set-dirty
:type
`(repeat
(choice :tag "Package or Detailed "
@@ -888,50 +888,46 @@ DOWNCASE t: Downcase words before using them."
(string :tag ""))
(option (boolean :tag "Downcase words "))))
-(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, breqn, ...
- ,(concat
- ;; Make sure we search only for optional arguments of
- ;; environments/macros and don't match any other [. ctable
- ;; provides a macro called \ctable, beamer/breqn/listings have
- ;; environments. Start with a backslash and a group for names
- "\\\\\\(?:"
- ;; begin, optional spaces and opening brace
- "begin[[:space:]]*{"
- ;; Build a regexp for env names
- (regexp-opt '("lstlisting" "dmath" "dseries" "dgroup"
- "darray" "frame"))
- ;; closing brace, optional spaces
- "}[[:space:]]*"
- ;; Now for macros
- "\\|"
- ;; Build a regexp for macro names; currently only \ctable
- (regexp-opt '("ctable"))
- ;; Close the group for names
- "\\)"
- ;; Match the opening [ and the following chars
- "\\[[^][]*"
- ;; Allow nested levels of chars enclosed in braces
- "\\(?:{[^}{]*"
- "\\(?:{[^}{]*"
- "\\(?:{[^}{]*}[^}{]*\\)*"
- "}[^}{]*\\)*"
- "}[^][]*\\)*"
- ;; Match the label key
- "\\<label[[:space:]]*=[[:space:]]*"
- ;; Match the label value; braces around the value are
- ;; optional.
- "{?\\(?1:[^] ,}\r\n\t%]+\\)"
- ;; We are done. Just search until the next closing bracket
- "[^]]*\\]"))
- "List of regexps matching \\label definitions.
+(defcustom reftex-label-regexps
+ `(;; Normal \\label{foo} labels
+ "\\\\label{\\(?1:[^}]*\\)}"
+ ;; keyvals [..., label = {foo}, ...] forms used by ctable,
+ ;; listings, breqn, ...
+ ,(concat
+ ;; Make sure we search only for optional arguments of
+ ;; environments/macros and don't match any other [. ctable
+ ;; provides a macro called \ctable, beamer/breqn/listings have
+ ;; environments. Start with a backslash and a group for names
+ "\\\\\\(?:"
+ ;; begin, optional spaces and opening brace
+ "begin[[:space:]]*{"
+ ;; Build a regexp for env names
+ (regexp-opt '("lstlisting" "dmath" "dseries" "dgroup"
+ "darray" "frame"))
+ ;; closing brace, optional spaces
+ "}[[:space:]]*"
+ ;; Now for macros
+ "\\|"
+ ;; Build a regexp for macro names; currently only \ctable
+ (regexp-opt '("ctable"))
+ ;; Close the group for names
+ "\\)"
+ ;; Match the opening [ and the following chars
+ "\\[[^][]*"
+ ;; Allow nested levels of chars enclosed in braces
+ "\\(?:{[^}{]*"
+ "\\(?:{[^}{]*"
+ "\\(?:{[^}{]*}[^}{]*\\)*"
+ "}[^}{]*\\)*"
+ "}[^][]*\\)*"
+ ;; Match the label key
+ "\\<label[[:space:]]*=[[:space:]]*"
+ ;; Match the label value; braces around the value are
+ ;; optional.
+ "{?\\(?1:[^] ,}\r\n\t%]+\\)"
+ ;; We are done. Just search until the next closing bracket
+ "[^]]*\\]"))
+ "List of regexps matching \\label definitions.
The default value matches usual \\label{...} definitions and
keyval style [..., label = {...}, ...] label definitions. The
regexp for keyval style explicitly looks for environments
@@ -946,13 +942,13 @@ you 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."
- :version "28.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"))))
+ :version "28.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.
@@ -1063,7 +1059,7 @@ This is used to string together whole reference sets, like
(defcustom reftex-ref-style-alist
'(("Default" t
- (("\\ref" ?\C-m) ("\\Ref" ?R) ("\\pageref" ?p)))
+ (("\\ref" ?\C-m) ("\\Ref" ?R) ("\\footref" ?n) ("\\pageref" ?p)))
("Varioref" "varioref"
(("\\vref" ?v) ("\\Vref" ?V) ("\\vpageref" ?g)))
("Fancyref" "fancyref"
@@ -1083,7 +1079,7 @@ 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 "27.1"
+ :version "28.1"
:type '(alist :key-type (string :tag "Style name")
:value-type (group (choice :tag "Package"
(const :tag "Any package" t)
@@ -1198,7 +1194,7 @@ 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."
:group 'reftex-citation-support
- :set 'reftex-set-dirty
+ :set #'reftex-set-dirty
:type '(repeat (regexp)))
(defcustom reftex-default-bibliography nil
@@ -1318,7 +1314,7 @@ macro before insertion. For example, it will change
\\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
+It 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
@@ -1460,7 +1456,7 @@ Note that AUCTeX sets these things internally for RefTeX as well, so
with a sufficiently new version of AUCTeX, you should not set the
package here."
:group 'reftex-index-support
- :set 'reftex-set-dirty
+ :set #'reftex-set-dirty
:type `(list
(repeat
:inline t
@@ -1728,7 +1724,7 @@ Multiple directories can be separated by the system dependent `path-separator'.
Directories ending in `//' or `!!' will be expanded recursively.
See also `reftex-use-external-file-finders'."
:group 'reftex-finding-files
- :set 'reftex-set-dirty
+ :set #'reftex-set-dirty
:type '(repeat (string :tag "Specification")))
(defcustom reftex-bibpath-environment-variables '("BIBINPUTS" "TEXBIB")
@@ -1744,7 +1740,7 @@ Directories ending in `//' or `!!' will be expanded recursively.
See also `reftex-use-external-file-finders'."
:group 'reftex-citation-support
:group 'reftex-finding-files
- :set 'reftex-set-dirty
+ :set #'reftex-set-dirty
:type '(repeat (string :tag "Specification")))
(defcustom reftex-file-extensions '(("tex" . (".tex" ".ltx"))