aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTassilo Horn2015-01-29 15:51:40 +0100
committerTassilo Horn2015-01-29 15:51:40 +0100
commitc4c447d8cca960513428eb3cfde73adca627d566 (patch)
treebc2e828d1010e1b73d7d2710575534f60e298ba7
parentb75358e98f3bdae9bc74010cfd9e09716b7ae02c (diff)
downloademacs-c4c447d8cca960513428eb3cfde73adca627d566.tar.gz
emacs-c4c447d8cca960513428eb3cfde73adca627d566.zip
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).
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/textmodes/reftex-vars.el32
2 files changed, 24 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2c852f9a40a..2811556c71c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12015-01-29 Tassilo Horn <tsdh@gnu.org>
2
3 * textmodes/reftex-vars.el (featurep): Conditionalize value of
4 reftex-label-regexps in order to stay compatible with XEmacs 25
5 which has no explicitly numbered groups in regexps (bug#19714).
6
12015-01-28 Tassilo Horn <tsdh@gnu.org> 72015-01-28 Tassilo Horn <tsdh@gnu.org>
2 8
3 * textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and ) 9 * textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 115c1e0cde4..96d76fb011b 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -866,13 +866,17 @@ DOWNCASE t: Downcase words before using them."
866 (string :tag "")) 866 (string :tag ""))
867 (option (boolean :tag "Downcase words ")))) 867 (option (boolean :tag "Downcase words "))))
868 868
869(defcustom reftex-label-regexps 869(if (featurep 'xemacs)
870 '(;; Normal \\label{foo} labels 870 ;; XEmacs 25 doesn't have explicitly numbered matching groups, so
871 "\\\\label{\\(?1:[^}]*\\)}" 871 ;; this list mustn't get any more items.
872 ;; keyvals [..., label = {foo}, ...] forms used by ctable, 872 (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}"))
873 ;; listings, minted, ... 873 (defcustom reftex-label-regexps
874 "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?") 874 '(;; Normal \\label{foo} labels
875 "List of regexps matching \\label definitions. 875 "\\\\label{\\(?1:[^}]*\\)}"
876 ;; keyvals [..., label = {foo}, ...] forms used by ctable,
877 ;; listings, minted, ...
878 "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
879 "List of regexps matching \\label definitions.
876The default value matches usual \\label{...} definitions and 880The default value matches usual \\label{...} definitions and
877keyval style [..., label = {...}, ...] label definitions. It is 881keyval style [..., label = {...}, ...] label definitions. It is
878assumed that the regexp group 1 matches the label text, so you 882assumed 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.
881When changed from Lisp, make sure to call 885When changed from Lisp, make sure to call
882`reftex-compile-variables' afterwards to make the change 886`reftex-compile-variables' afterwards to make the change
883effective." 887effective."
884 :version "24.4" 888 :version "24.4"
885 :set (lambda (symbol value) 889 :set (lambda (symbol value)
886 (set symbol value) 890 (set symbol value)
887 (when (fboundp 'reftex-compile-variables) 891 (when (fboundp 'reftex-compile-variables)
888 (reftex-compile-variables))) 892 (reftex-compile-variables)))
889 :group 'reftex-defining-label-environments 893 :group 'reftex-defining-label-environments
890 :type '(repeat (regexp :tag "Regular Expression"))) 894 :type '(repeat (regexp :tag "Regular Expression"))))
891 895
892(defcustom reftex-label-ignored-macros-and-environments nil 896(defcustom reftex-label-ignored-macros-and-environments nil
893 "List of macros and environments to be ignored when searching for labels. 897 "List of macros and environments to be ignored when searching for labels.