summaryrefslogtreecommitdiff
path: root/lisp/textmodes/reftex-vars.el
diff options
context:
space:
mode:
authorTassilo Horn <tsdh@gnu.org>2015-12-14 18:46:47 +0100
committerTassilo Horn <tsdh@gnu.org>2015-12-14 18:46:47 +0100
commitecaaf900e84233d142a656250767544ff34d010a (patch)
treefa30351c73a4e9d184bb669c01a0b6492fb11873 /lisp/textmodes/reftex-vars.el
parentfe27e037663d36be3e5741c2ce86ab4ee8017db1 (diff)
downloademacs-ecaaf900e84233d142a656250767544ff34d010a.tar.gz
Revert "Fix rx matcher overflow without limiting"
This reverts commit fe27e037663d36be3e5741c2ce86ab4ee8017db1.
Diffstat (limited to 'lisp/textmodes/reftex-vars.el')
-rw-r--r--lisp/textmodes/reftex-vars.el12
1 files changed, 1 insertions, 11 deletions
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 9bc1d2d3af8..fcab1367f7d 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -877,17 +877,7 @@ DOWNCASE t: Downcase words before using them."
"\\\\label{\\(?1:[^}]*\\)}"
;; keyvals [..., label = {foo}, ...] forms used by ctable,
;; listings, minted, ...
- ;;
- ;; If you think the first shy group is a bit strange, it is like
- ;; that in order not to overflow the regexp matcher stack in the
- ;; presence of unbalanced brackets, i.e., a [ and then no
- ;; closing bracket anymore. In "[^[],]*,", the "*" repetition
- ;; will be done without any need to record state for eventual
- ;; backtracking because the "," is mutually exclusive with the
- ;; "[^][,]", and the regexp matcher includes a special
- ;; optimization for that case since it's common and very
- ;; useful). (Hint by Stefan Monnier)
- "\\[\\(?:[^][,]*,\\)*[ \t]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
+ "\\[[^][]\\{0,2000\\}\\<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