mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-03 06:00:50 -08:00
(font-lock-mode): Set after-revert-hook
to refontify after revert.
This commit is contained in:
parent
fb6208a6aa
commit
87cd38d6ef
1 changed files with 4 additions and 1 deletions
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue