diff options
author | 2003-04-15 16:06:09 +0000 | |
---|---|---|
committer | 2003-04-15 16:06:09 +0000 | |
commit | 8e5c126fa7a814415e1e506dac183e05a124521b (patch) | |
tree | 609e2b5c0bca65ce8d7b2cf2e621263c3ce7d7fd | |
parent | e69c2921297c18a40f0fd76755a187809fa86fc6 (diff) |
Save match data in font-locking function for antiquotations (patch from CW).
-rw-r--r-- | isar/isar-syntax.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/isar/isar-syntax.el b/isar/isar-syntax.el index 57054a57..a236fa5e 100644 --- a/isar/isar-syntax.el +++ b/isar/isar-syntax.el @@ -215,16 +215,17 @@ (defun isar-match-antiq (limit) "Match Isabelle/Isar antiquotations." - (or - (and (proof-looking-at-syntactic-context) - (proof-looking-at isar-antiq-regexp)) - (let (done ans) - (while (not done) - (if (proof-re-search-forward isar-antiq-regexp limit t) - (and (proof-looking-at-syntactic-context) - (setq done t) (setq ans t)) - (setq done t))) - ans))) + (save-match-data + (or + (and (proof-looking-at-syntactic-context) + (proof-looking-at isar-antiq-regexp)) + (let (done ans) + (while (not done) + (if (proof-re-search-forward isar-antiq-regexp limit t) + (and (proof-looking-at-syntactic-context) + (setq done t) (setq ans t)) + (setq done t))) + ans)))) ;; ----- Isabelle inner syntax hilite |