aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/proof-syntax.el
diff options
context:
space:
mode:
Diffstat (limited to 'generic/proof-syntax.el')
-rw-r--r--generic/proof-syntax.el14
1 files changed, 5 insertions, 9 deletions
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el
index e93f5ca4..d494279a 100644
--- a/generic/proof-syntax.el
+++ b/generic/proof-syntax.el
@@ -36,18 +36,14 @@ Uses a regexp of the form \\_<...\\_>."
(defconst proof-no-regexp "\\<\\>"
"A regular expression that never matches anything.")
-(defsubst proof-regexp-alt (&rest args)
+(defsubst proof-regexp-alt-list (args)
"Return the regexp which matches any of the regexps ARGS."
- ;; see regexp-opt (NB: but that is for strings, not regexps)
- (let ((res ""))
- (dolist (regexp args)
- (setq res (concat res (if (string-equal res "") "\\(?:" "\\|\\(?:")
- regexp "\\)")))
- res))
+ (mapconcat #'identity args "\\|"))
-(defsubst proof-regexp-alt-list (args)
+(defsubst proof-regexp-alt (&rest args)
"Return the regexp which matches any of the regexps ARGS."
- (apply 'proof-regexp-alt args))
+ ;; see regexp-opt (NB: but that is for strings, not regexps)
+ (proof-regexp-alt-list args))
(defsubst proof-re-search-forward-region (startre endre)
"Search for a region delimited by regexps STARTRE and ENDRE.