1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Make font-lock-refontify try even harder to refontify

* lisp/font-lock.el (font-lock-refontify): Make this command work
even after switching global font lock mode on and then off again.
This commit is contained in:
Lars Ingebrigtsen 2019-10-30 15:04:17 +01:00
parent 1fc8bf71d9
commit 9df254119c

View file

@ -1107,7 +1107,9 @@ locking for a mode, and is not meant to be called from lisp functions."
(interactive)
(declare (interactive-only t))
(setq font-lock-major-mode nil)
(font-lock-ensure))
(font-lock-set-defaults)
(save-excursion
(font-lock-fontify-region (point-min) (point-max))))
(defun font-lock-ensure (&optional beg end)
"Make sure the region BEG...END has been fontified.