* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve regex in
order not to trigger a stack overflow in regex matcher with unbalanced
brackets (bug#22146).
"\\\\label{\\(?1:[^}]*\\)}"
;; keyvals [..., label = {foo}, ...] forms used by ctable,
;; listings, minted, ...
- "\\[[^][]*\\<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