diff options
| author | Tassilo Horn | 2015-01-29 15:51:40 +0100 |
|---|---|---|
| committer | Tassilo Horn | 2015-01-29 15:51:40 +0100 |
| commit | c4c447d8cca960513428eb3cfde73adca627d566 (patch) | |
| tree | bc2e828d1010e1b73d7d2710575534f60e298ba7 | |
| parent | b75358e98f3bdae9bc74010cfd9e09716b7ae02c (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-vars.el | 32 |
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 @@ | |||
| 1 | 2015-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 | |||
| 1 | 2015-01-28 Tassilo Horn <tsdh@gnu.org> | 7 | 2015-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. | ||
| 876 | The default value matches usual \\label{...} definitions and | 880 | The default value matches usual \\label{...} definitions and |
| 877 | keyval style [..., label = {...}, ...] label definitions. It is | 881 | keyval style [..., label = {...}, ...] label definitions. It is |
| 878 | assumed that the regexp group 1 matches the label text, so you | 882 | 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. | |||
| 881 | When changed from Lisp, make sure to call | 885 | When 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 |
| 883 | effective." | 887 | effective." |
| 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. |