diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-01-18 19:23:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-01-18 19:23:14 +0000 |
| commit | 87cd38d6effdfa2d06a5f6e17f4e2f701595ecdd (patch) | |
| tree | 8da605cbd67a7caab73cfa4534abe4df2694f66c | |
| parent | fb6208a6aab5ec8482894e6d7b063f02cdc2e464 (diff) | |
| download | emacs-87cd38d6effdfa2d06a5f6e17f4e2f701595ecdd.tar.gz | |
(font-lock-mode): Set after-revert-hook
to refontify after revert.
| -rw-r--r-- | lisp/font-lock.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index e1f35b179d3..9ce1ed1e8bc 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -365,14 +365,17 @@ can use \\[font-lock-fontify-buffer]." (set (make-local-variable 'font-lock-mode) on-p) (cond (on-p (font-lock-set-defaults) + (make-local-variable 'after-revert-hook) + ;;if buffer is reverted, must repeat fontification. + (setq after-revert-hook 'font-lock-fontify-buffer) (run-hooks 'font-lock-mode-hook) (or font-lock-fontified (font-lock-fontify-buffer))) (font-lock-fontified (setq font-lock-fontified nil) + (setq after-revert-hook nil) (font-lock-unfontify-region (point-min) (point-max)))) (force-mode-line-update))) - (defun font-lock-fontify-buffer () "Fontify the current buffer the way `font-lock-mode' would: |
