[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 41472f3b6c: Document 'jit-lock-debug-mode'
From: |
Eli Zaretskii |
Subject: |
emacs-28 41472f3b6c: Document 'jit-lock-debug-mode' |
Date: |
Sun, 3 Jul 2022 01:41:52 -0400 (EDT) |
branch: emacs-28
commit 41472f3b6c028db18228fb569457ab1c1313f36b
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Document 'jit-lock-debug-mode'
* doc/lispref/modes.texi (Other Font Lock Variables): Document
'jit-lock-debug-mode'.
---
doc/lispref/modes.texi | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index bc078d60e1..cb748606ed 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3321,7 +3321,8 @@ fontification functions, and gives it two arguments,
@var{start} and
@var{end}, which specify the region to be fontified or refontified.
If @var{function} performs fontifications, it can return a list of the
form @w{@code{(jit-lock-bounds @var{beg} . @var{end})}}, to indicate
-the bounds of the region it actually fontified; JIT font-lock will use
+the bounds of the region it actually fontified; Just-In-Time (a.k.a.@:
+@acronym{``JIT''}) font-lock will use
this information to optimize subsequent redisplay cycles and regions
of buffer text it will pass to future calls to @var{function}.
@@ -3341,6 +3342,19 @@ If @var{function} was previously registered as a
fontification
function using @code{jit-lock-register}, this function unregisters it.
@end defun
+@cindex debugging font-lock
+@cindex jit-lock functions, debugging
+@deffn Command jit-lock-debug-mode &optional arg
+This is a minor mode whose purpose is to help in debugging code that
+is run by JIT font-lock. When this mode is enabled, most of the code
+that JIT font-lock normally runs during redisplay cycles, where Lisp
+errors are suppressed, is instead run by a timer. Thus, this mode
+allows using debugging aids such as @code{debug-on-error}
+(@pxref{Error Debugging}) and Edebug (@pxref{Edebug}) for finding and
+fixing problems in font-lock code and any other code run by JIT
+font-lock.
+@end deffn
+
@node Levels of Font Lock
@subsection Levels of Font Lock
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 41472f3b6c: Document 'jit-lock-debug-mode',
Eli Zaretskii <=