# HG changeset patch # User Richard M. Stallman # Date 758920994 0 # Node ID 24f92f49a07f99281f9df696ff132f720304a9d1 # Parent 76f618230217454feecda39689b2d9f927a51219 (font-lock-mode): Set after-revert-hook to refontify after revert. diff -r 76f618230217 -r 24f92f49a07f lisp/font-lock.el --- a/lisp/font-lock.el Tue Jan 18 19:13:11 1994 +0000 +++ b/lisp/font-lock.el Tue Jan 18 19:23:14 1994 +0000 @@ -365,14 +365,17 @@ (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: