From b18cecf89bbb9d2d057f86e8fa1a1f1417d887b6 Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Sat, 23 Feb 2019 14:02:05 +0100 Subject: [PATCH] Improve matching of key-val labels (bug#34629) * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve regexp for key-val labels in order to skip over content in braces. --- lisp/textmodes/reftex-vars.el | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 9147de6e01e..eb1dfc50a35 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -891,11 +891,29 @@ DOWNCASE t: Downcase words before using them." ;; so this list mustn't get any more items. (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}")) (defcustom reftex-label-regexps - '(;; Normal \\label{foo} labels + `(;; Normal \\label{foo} labels "\\\\label{\\(?1:[^}]*\\)}" ;; keyvals [..., label = {foo}, ...] forms used by ctable, ;; listings, minted, ... - "\\[[^][]\\{0,2000\\}\\