diff options
| author | Lars Ingebrigtsen | 2019-10-31 13:26:19 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-10-31 13:26:19 +0100 |
| commit | 60ad3d63cf6100f30801eb9c0256a84907da1dca (patch) | |
| tree | 54eef0a0c84481fbe52df8a77a236491aa421dce | |
| parent | d630a047bbba8bf0ab07250a7f750eefb3a48eae (diff) | |
| download | emacs-60ad3d63cf6100f30801eb9c0256a84907da1dca.tar.gz emacs-60ad3d63cf6100f30801eb9c0256a84907da1dca.zip | |
Clean up font-lock-refontify slightly
* lisp/font-lock.el (font-lock-refontify): Use
syntax-ppss-flush-cache instead of internal variable.
| -rw-r--r-- | lisp/font-lock.el | 6 |
1 files changed, 4 insertions, 2 deletions
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 | |||
| 1106 | locking for a mode, and is not meant to be called from lisp functions." | 1106 | locking for a mode, and is not meant to be called from lisp functions." |
| 1107 | (interactive) | 1107 | (interactive) |
| 1108 | (declare (interactive-only t)) | 1108 | (declare (interactive-only t)) |
| 1109 | (setq font-lock-major-mode nil | 1109 | ;; Make font-lock recalculate all the mode-specific data. |
| 1110 | syntax-propertize--done -1) | 1110 | (setq font-lock-major-mode nil) |
| 1111 | ;; Make the syntax machinery discard all information. | ||
| 1112 | (syntax-ppss-flush-cache -1) | ||
| 1111 | (font-lock-set-defaults) | 1113 | (font-lock-set-defaults) |
| 1112 | (save-excursion | 1114 | (save-excursion |
| 1113 | (font-lock-fontify-region (point-min) (point-max)))) | 1115 | (font-lock-fontify-region (point-min) (point-max)))) |