summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/font-lock.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 971e37309e9..2c91586c99d 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -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.