diff options
author | 2001-05-08 11:17:38 +0000 | |
---|---|---|
committer | 2001-05-08 11:17:38 +0000 | |
commit | e5b3ecbf2f65f373ad26781184bab71612423cd8 (patch) | |
tree | 7ab56a44250f61c19113496e1c0ef9f0097f42df /generic/proof-utils.el | |
parent | b143d80ab415ead0390867156b8c13cf11c6bc06 (diff) |
Fixes for fontification in Xemacs 21.4
Diffstat (limited to 'generic/proof-utils.el')
-rw-r--r-- | generic/proof-utils.el | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el index 942acd42..8989b695 100644 --- a/generic/proof-utils.el +++ b/generic/proof-utils.el @@ -1,6 +1,6 @@ ;; proof-utils.el Proof General utility functions ;; -;; Copyright (C) 1998-2000 LFCS Edinburgh. +;; Copyright (C) 1998-2001 LFCS Edinburgh. ;; ;; Author: David Aspinall <da@dcs.ed.ac.uk> and others ;; Maintainer: Proof General maintainer <proofgen@dcs.ed.ac.uk> @@ -325,7 +325,11 @@ Returns new END value." ;; 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. Probably they shouldn't! - (narrow-to-region start end) + + ;; 3.5.01: narrowing causes failure in parse-sexp in XEmacs 21.4. + ;; I don't think we need it now we use a function to fontify + ;; just the region. + ;; (narrow-to-region start end) (if proof-output-fontify-enable (progn @@ -336,6 +340,16 @@ Returns new END value." ;; FIXME: should set other bits of font lock defaults, ;; perhaps, such as case fold etc. What happened to ;; the careful buffer local font-lock-defaults?? + ;; ================================================ + ;; 3.5.01: call to font-lock-fontify-region breaks + ;; in xemacs 21.4. Following hack to fix + (if (and (string-match "21\\.4.*XEmacs" emacs-version) + (not font-lock-cache-position)) + (progn + (setq font-lock-cache-position (make-marker)) + (set-marker font-lock-cache-position 0))) + + ;; ================================================ (font-lock-fontify-region start end) (proof-zap-commas-region start end)))) (if proof-shell-leave-annotations-in-output @@ -349,8 +363,10 @@ Returns new END value." (delete-char -1))) (goto-char p))) (proof-x-symbol-decode-region start (point-max)) - (prog1 (point-max) - (widen))) + (point-max)) +;; old ending: +;; (prog1 (point-max) +;; (widen))) ;; FIXME todo: add toggle for fontify region which turns it on/off ;; (maybe). |