]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/font-lock.el (font-lock-ensure-function): Fix bug#33798
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 Dec 2018 04:05:36 +0000 (23:05 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 Dec 2018 04:05:36 +0000 (23:05 -0500)
lisp/font-lock.el

index b4cf5b0387ddc6b6dc459065e517330484315e67..f50a7150aad54163a15ad405a413bfdcd21d7f5c 100644 (file)
@@ -1093,14 +1093,9 @@ accessible portion of the current buffer."
                 (or beg (point-min)) (or end (point-max)))))
 
 (defvar font-lock-ensure-function
-  (lambda (_beg _end)
+  (lambda (beg end)
     (unless font-lock-fontified
-      (font-lock-default-fontify-buffer)
-      (unless font-lock-mode
-        ;; If font-lock is not enabled, we don't have the hooks in place to
-        ;; track modifications, so a subsequent call to font-lock-ensure can't
-        ;; assume that the fontification is still valid.
-        (setq font-lock-fontified nil))))
+      (font-lock-fontify-region beg end)))
   "Function to make sure a region has been fontified.
 Called with two arguments BEG and END.")