aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/jit-lock.el7
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4f8631d5a7e..e7a44e8e59c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-12-16 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * jit-lock.el (jit-lock-function): Don't defer if jit-lock-defer-time
4 is 0 and there is no input pending.
5
12014-12-15 Juri Linkov <juri@linkov.net> 62014-12-15 Juri Linkov <juri@linkov.net>
2 7
3 * replace.el (query-replace-read-from): Use query-replace-compile-replacement 8 * replace.el (query-replace-read-from): Use query-replace-compile-replacement
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 34f14a5af63..74bfa3ab078 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -125,7 +125,8 @@ The value of this variable is used when JIT Lock mode is turned on."
125 125
126(defcustom jit-lock-defer-time nil ;; 0.25 126(defcustom jit-lock-defer-time nil ;; 0.25
127 "Idle time after which deferred fontification should take place. 127 "Idle time after which deferred fontification should take place.
128If nil, fontification is not deferred." 128If nil, fontification is not deferred.
129If 0, then fontification is only deferred while there is input pending."
129 :group 'jit-lock 130 :group 'jit-lock
130 :type '(choice (const :tag "never" nil) 131 :type '(choice (const :tag "never" nil)
131 (number :tag "seconds"))) 132 (number :tag "seconds")))
@@ -333,7 +334,9 @@ Only applies to the current buffer."
333This function is added to `fontification-functions' when `jit-lock-mode' 334This function is added to `fontification-functions' when `jit-lock-mode'
334is active." 335is active."
335 (when (and jit-lock-mode (not memory-full)) 336 (when (and jit-lock-mode (not memory-full))
336 (if (null jit-lock-defer-timer) 337 (if (not (and jit-lock-defer-timer
338 (or (not (eq jit-lock-defer-time 0))
339 (input-pending-p))))
337 ;; No deferral. 340 ;; No deferral.
338 (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) 341 (jit-lock-fontify-now start (+ start jit-lock-chunk-size))
339 ;; Record the buffer for later fontification. 342 ;; Record the buffer for later fontification.