aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/jit-lock.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index e9b4b2ed309..cf1261e3652 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -253,13 +253,14 @@ the variable `jit-lock-stealth-nice'."
253 (remove-hook 'fontification-functions 'jit-lock-function)))) 253 (remove-hook 'fontification-functions 'jit-lock-function))))
254 254
255(defun jit-lock-register (fun) 255(defun jit-lock-register (fun)
256 "Register FUN as a fontification function to be called by jit-lock. 256 "Register FUN as a fontification function to be called in this buffer.
257Only applies to the current buffer." 257FUN will be called with two arguments START and END indicating the region
258that need to be (re)fontified."
258 (add-hook 'jit-lock-functions fun nil t) 259 (add-hook 'jit-lock-functions fun nil t)
259 (jit-lock-mode t)) 260 (jit-lock-mode t))
260 261
261(defun jit-lock-unregister (fun) 262(defun jit-lock-unregister (fun)
262 "Unregister FUN as a fontification function to be called by jit-lock. 263 "Unregister FUN as a fontification function.
263Only applies to the current buffer." 264Only applies to the current buffer."
264 (remove-hook 'jit-lock-functions fun t) 265 (remove-hook 'jit-lock-functions fun t)
265 (when (or (null jit-lock-functions) 266 (when (or (null jit-lock-functions)