[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master bce1735: * lisp/font-lock.el (font-lock-ensure): Use font-lock-sp

From: Juri Linkov
Subject: master bce1735: * lisp/font-lock.el (font-lock-ensure): Use font-lock-specified-p (bug#39597)
Date: Sat, 22 Feb 2020 19:37:04 -0500 (EST)

branch: master
commit bce17355ac9f6a6f8ed778bd310f3baaea514270
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/font-lock.el (font-lock-ensure): Use font-lock-specified-p 
 lisp/font-lock.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 506c888..e0955b7 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1120,9 +1120,10 @@ locking for a mode, and is not meant to be called from 
lisp functions."
   "Make sure the region BEG...END has been fontified.
 If the region is not specified, it defaults to the entire accessible
 portion of the buffer."
-  (font-lock-set-defaults)
-  (funcall font-lock-ensure-function
-           (or beg (point-min)) (or end (point-max))))
+  (when (font-lock-specified-p t)
+    (font-lock-set-defaults)
+    (funcall font-lock-ensure-function
+             (or beg (point-min)) (or end (point-max)))))
 (defun font-lock-default-fontify-buffer ()
   "Fontify the whole buffer using `font-lock-fontify-region-function'."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]