aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aspinall2009-12-01 09:49:18 +0000
committerDavid Aspinall2009-12-01 09:49:18 +0000
commitbf4ec2a34524e38417ee683fdbe288331d5fdb73 (patch)
tree0b6f351e8808c90b79b5e8521540e139d2a62fc0
parentcc2832dba473d23d7864c57917ad97bf2f275383 (diff)
proof-ids-to-regexp: use regexp-opt, this seems reliable now.
-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."