diff options
| author | Stefan Kangas | 2022-07-04 06:30:34 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-07-04 06:30:34 +0200 |
| commit | 3f2af38ef844e29ab31e5d30e3ccee91a33f6b99 (patch) | |
| tree | a31110b0441fab0305f88d5f4760f03226305ec2 | |
| parent | c96cd5e2b71f1de8c5b84c290ec8c9a01ec75bdd (diff) | |
| parent | 41472f3b6c028db18228fb569457ab1c1313f36b (diff) | |
| download | emacs-3f2af38ef844e29ab31e5d30e3ccee91a33f6b99.tar.gz emacs-3f2af38ef844e29ab31e5d30e3ccee91a33f6b99.zip | |
Merge from origin/emacs-28
41472f3b6c Document 'jit-lock-debug-mode'
| -rw-r--r-- | doc/lispref/modes.texi | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 4f40f35ff45..2ba37e413c0 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -3473,7 +3473,8 @@ fontification functions, and gives it two arguments, @var{start} and | |||
| 3473 | @var{end}, which specify the region to be fontified or refontified. | 3473 | @var{end}, which specify the region to be fontified or refontified. |
| 3474 | If @var{function} performs fontifications, it can return a list of the | 3474 | If @var{function} performs fontifications, it can return a list of the |
| 3475 | form @w{@code{(jit-lock-bounds @var{beg} . @var{end})}}, to indicate | 3475 | form @w{@code{(jit-lock-bounds @var{beg} . @var{end})}}, to indicate |
| 3476 | the bounds of the region it actually fontified; JIT font-lock will use | 3476 | the bounds of the region it actually fontified; Just-In-Time (a.k.a.@: |
| 3477 | @acronym{``JIT''}) font-lock will use | ||
| 3477 | this information to optimize subsequent redisplay cycles and regions | 3478 | this information to optimize subsequent redisplay cycles and regions |
| 3478 | of buffer text it will pass to future calls to @var{function}. | 3479 | of buffer text it will pass to future calls to @var{function}. |
| 3479 | 3480 | ||
| @@ -3493,6 +3494,19 @@ If @var{function} was previously registered as a fontification | |||
| 3493 | function using @code{jit-lock-register}, this function unregisters it. | 3494 | function using @code{jit-lock-register}, this function unregisters it. |
| 3494 | @end defun | 3495 | @end defun |
| 3495 | 3496 | ||
| 3497 | @cindex debugging font-lock | ||
| 3498 | @cindex jit-lock functions, debugging | ||
| 3499 | @deffn Command jit-lock-debug-mode &optional arg | ||
| 3500 | This is a minor mode whose purpose is to help in debugging code that | ||
| 3501 | is run by JIT font-lock. When this mode is enabled, most of the code | ||
| 3502 | that JIT font-lock normally runs during redisplay cycles, where Lisp | ||
| 3503 | errors are suppressed, is instead run by a timer. Thus, this mode | ||
| 3504 | allows using debugging aids such as @code{debug-on-error} | ||
| 3505 | (@pxref{Error Debugging}) and Edebug (@pxref{Edebug}) for finding and | ||
| 3506 | fixing problems in font-lock code and any other code run by JIT | ||
| 3507 | font-lock. | ||
| 3508 | @end deffn | ||
| 3509 | |||
| 3496 | @node Levels of Font Lock | 3510 | @node Levels of Font Lock |
| 3497 | @subsection Levels of Font Lock | 3511 | @subsection Levels of Font Lock |
| 3498 | 3512 | ||