diff options
author | 2002-07-18 09:43:51 +0000 | |
---|---|---|
committer | 2002-07-18 09:43:51 +0000 | |
commit | a063632054162073ddb0aca986c366094d569e05 (patch) | |
tree | 781e35105c18b0ec777a6bf39dc1045b36d45e32 /generic/proof-utils.el | |
parent | 146ef38de126e299c23e4bb3ef49b0ac405926da (diff) |
Fix active variable highlighting in Isabelle with X-Symbol.
Diffstat (limited to 'generic/proof-utils.el')
-rw-r--r-- | generic/proof-utils.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el index e0502010..416edbce 100644 --- a/generic/proof-utils.el +++ b/generic/proof-utils.el @@ -363,7 +363,9 @@ Returns new END value." ;; We fontify first because X-sym decoding changes char positions. ;; It's okay because x-symbol-decode works even without font lock. ;; Possible disadvantage is that font lock patterns can't refer - ;; to X-Symbol characters. + ;; to X-Symbol characters. + ;; NB: perhaps we can narrow within the whole function, but there + ;; was an earlier problem with doing that. (if proof-output-fontify-enable (progn ;; Temporarily set font-lock defaults @@ -379,11 +381,18 @@ Returns new END value." (progn (setq font-lock-cache-position (make-marker)) (set-marker font-lock-cache-position 0))) - - (run-hooks 'pg-before-fontify-output-hook) + + (save-restriction + (narrow-to-region start end) + (run-hooks 'pg-before-fontify-output-hook) + (setq end (point-max))) (font-lock-default-fontify-region start end nil) - ;; after-fontify hook might do this ugly zap commas thing. + ;; FIXME: after-fontify hook might do this ugly zap commas thing. (proof-zap-commas-region start end)))) + (save-restriction + (narrow-to-region start end) + (run-hooks 'pg-after-fontify-output-hook) + (setq end (point-max))) (if (and pg-use-specials-for-fontify (not keepspecials)) (progn (pg-remove-specials start end) |