diff options
author | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2018-12-20 14:42:21 +0100 |
---|---|---|
committer | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2018-12-20 14:42:21 +0100 |
commit | ebb55c998867fd13f8767a52a9542447347f7dc1 (patch) | |
tree | a2419396d62c3342e73e44099b8745d3201d09c7 /generic/proof-syntax.el | |
parent | 0c9565d4d69a94cf33db5f98b381c3332709aa1e (diff) | |
parent | 883ce2ff1092003b6341cfebd1d7b2ab31239a41 (diff) |
Merge branch 'master' of github.com:ProofGeneral/PG
Diffstat (limited to 'generic/proof-syntax.el')
-rw-r--r-- | generic/proof-syntax.el | 14 |
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. |