Clean up font-lock-refontify slightly

* lisp/font-lock.el (font-lock-refontify): Use
syntax-ppss-flush-cache instead of internal variable.
This commit is contained in:
Lars Ingebrigtsen 2019-10-31 13:26:19 +01:00
parent d630a047bb
commit 60ad3d63cf

View file

@ -1106,8 +1106,10 @@ This functions is a convenience functions when developing font
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
syntax-propertize--done -1)
;; Make font-lock recalculate all the mode-specific data.
(setq font-lock-major-mode nil)
;; Make the syntax machinery discard all information.
(syntax-ppss-flush-cache -1)
(font-lock-set-defaults)
(save-excursion
(font-lock-fontify-region (point-min) (point-max))))