diff options
| author | Makarius Wenzel | 1999-07-02 22:11:56 +0000 |
|---|---|---|
| committer | Makarius Wenzel | 1999-07-02 22:11:56 +0000 |
| commit | 9af3b0e0bca207591b8172bc859c529edeea32cf (patch) | |
| tree | 8c067ea212057e76d5a1c244c8fbdd372f8ad558 | |
| parent | 6c80d2314ae6b6de4ec00b0e5c9b583ed928f06b (diff) | |
fixed some regexp via proof-anchor-regexp;
| -rw-r--r-- | coq/coq-syntax.el | 4 | ||||
| -rw-r--r-- | generic/proof-syntax.el | 4 | ||||
| -rw-r--r-- | isa/isa-syntax.el | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el index 4a9723b0..11c6df93 100644 --- a/coq/coq-syntax.el +++ b/coq/coq-syntax.el @@ -269,12 +269,12 @@ ;; It is understood here as being a goal. This is important for ;; recognizing global identifiers, see coq-global-p. (defconst coq-save-command-regexp - (concat "^" (proof-ids-to-regexp coq-keywords-save))) + (proof-anchor-regexp (proof-ids-to-regexp coq-keywords-save))) (defconst coq-save-with-hole-regexp (concat "\\(" (proof-ids-to-regexp coq-keywords-save) "\\)\\s-+\\(" coq-id "\\)\\s-*\.")) (defconst coq-goal-command-regexp - (concat "^" (proof-ids-to-regexp coq-keywords-goal))) + (proof-anchor-regexp (proof-ids-to-regexp coq-keywords-goal))) (defconst coq-goal-with-hole-regexp (concat "\\(" (proof-ids-to-regexp coq-keywords-goal) "\\)\\s-+\\(" coq-id "\\)\\s-*[:]?")) diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el index 7a4a8330..1d03131e 100644 --- a/generic/proof-syntax.el +++ b/generic/proof-syntax.el @@ -17,6 +17,10 @@ expression matching any of its elements" (mapconcat (lambda (s) (concat "\\<" s "\\>")) l "\\|")) +(defun proof-anchor-regexp (e) + "Anchor (^) and group the regexp." + (concat "^\\(" e "\\)")) + (defun proof-regexp-alt (&rest args) "Return the regexp which matches any of the regexps ARGS." ;; Is this not available in some library? diff --git a/isa/isa-syntax.el b/isa/isa-syntax.el index 1bf2775f..90e4f2ec 100644 --- a/isa/isa-syntax.el +++ b/isa/isa-syntax.el @@ -117,7 +117,7 @@ "*Font-lock table for Isabelle terms.") (defconst isa-save-command-regexp - (concat "^" (proof-ids-to-regexp isa-keywords-save))) + (proof-anchor-regexp (proof-ids-to-regexp isa-keywords-save)))) ;; CHECKED (defconst isa-save-with-hole-regexp @@ -125,7 +125,7 @@ "\\)\\s-+\"\\(" isa-id "\\)\"\\s-*;")) (defcustom isa-goal-command-regexp - (proof-ids-to-regexp isa-keywords-goal) + (proof-anchor-regexp (proof-ids-to-regexp isa-keywords-goal)) "Regular expression used to match a goal." :type 'regexp :group 'isabelle-config) |
