From 8e5c126fa7a814415e1e506dac183e05a124521b Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Tue, 15 Apr 2003 16:06:09 +0000 Subject: Save match data in font-locking function for antiquotations (patch from CW). --- isar/isar-syntax.el | 21 +++++++++++---------- 1 file 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 -- cgit v1.2.3