]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-mode): Set after-revert-hook
authorRichard M. Stallman <rms@gnu.org>
Tue, 18 Jan 1994 19:23:14 +0000 (19:23 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 18 Jan 1994 19:23:14 +0000 (19:23 +0000)
to refontify after revert.

lisp/font-lock.el

index e1f35b179d39a2f9ce14b97eb939ad8ead459973..9ce1ed1e8bc486083f50b8eaa0c410cc3a65339a 100644 (file)
@@ -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: