aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2003-04-15 16:06:09 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2003-04-15 16:06:09 +0000
commit8e5c126fa7a814415e1e506dac183e05a124521b (patch)
tree609e2b5c0bca65ce8d7b2cf2e621263c3ce7d7fd
parente69c2921297c18a40f0fd76755a187809fa86fc6 (diff)
Save match data in font-locking function for antiquotations (patch from CW).
-rw-r--r--isar/isar-syntax.el21
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