From: Lars Ingebrigtsen Date: Thu, 31 Oct 2019 12:26:19 +0000 (+0100) Subject: Clean up font-lock-refontify slightly X-Git-Tag: emacs-27.0.90~800 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=60ad3d63cf6100f30801eb9c0256a84907da1dca;p=emacs.git Clean up font-lock-refontify slightly * lisp/font-lock.el (font-lock-refontify): Use syntax-ppss-flush-cache instead of internal variable. --- diff --git a/lisp/font-lock.el b/lisp/font-lock.el index ef0e2dc0458..4eb7bb8c2d4 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -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))))