Restore XEmacs compatibility

* textmodes/reftex-vars.el (featurep): Conditionalize value of
reftex-label-regexps in order to stay compatible with XEmacs 25
which has no explicitly numbered groups in regexps (bug#19714).
This commit is contained in:
Tassilo Horn 2015-01-29 15:51:40 +01:00
parent b75358e98f
commit c4c447d8cc
2 changed files with 24 additions and 14 deletions

View file

@ -1,3 +1,9 @@
2015-01-29 Tassilo Horn <tsdh@gnu.org>
* textmodes/reftex-vars.el (featurep): Conditionalize value of
reftex-label-regexps in order to stay compatible with XEmacs 25
which has no explicitly numbered groups in regexps (bug#19714).
2015-01-28 Tassilo Horn <tsdh@gnu.org>
* textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )

View file

@ -866,13 +866,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 25 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, ...
"\\[[^]]*\\<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
@ -881,13 +885,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."
:version "24.4"
: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 "24.4"
: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.