emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 c4c447d: Restore XEmacs compatibility


From: Tassilo Horn
Subject: [Emacs-diffs] emacs-24 c4c447d: Restore XEmacs compatibility
Date: Thu, 29 Jan 2015 14:52:05 +0000

branch: emacs-24
commit c4c447d8cca960513428eb3cfde73adca627d566
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    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).
---
 lisp/ChangeLog                |    6 ++++++
 lisp/textmodes/reftex-vars.el |   32 ++++++++++++++++++--------------
 2 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2c852f9..2811556 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-29  Tassilo Horn  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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 115c1e0..96d76fb 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]