aboutsummaryrefslogtreecommitdiff
path: root/generic/proof-syntax.el
diff options
context:
space:
mode:
Diffstat (limited to 'generic/proof-syntax.el')
-rw-r--r--generic/proof-syntax.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el
index a261af2f..6c04e111 100644
--- a/generic/proof-syntax.el
+++ b/generic/proof-syntax.el
@@ -15,8 +15,11 @@
;;; Code:
(defsubst proof-ids-to-regexp (l)
- "Maps a non-empty list of tokens `l' to a regexp matching any element."
- (concat "\\_<\\(?:" (mapconcat 'identity l "\\|") "\\)\\_>"))
+ "Maps a non-empty list of tokens `l' to a regexp matching any element.
+Uses a regexp of the form \\_<...\\_>."
+ (concat "\\_<\\(?:"
+ (regexp-opt l) ; was: (mapconcat 'identity l "\\|")
+ "\\)\\_>"))
(defsubst proof-anchor-regexp (e)
"Anchor (\\`) and group the regexp E."