summaryrefslogtreecommitdiff
path: root/doc/lispref/modes.texi
diff options
context:
space:
mode:
authorYuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>2022-08-29 11:41:10 -0700
committerYuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>2022-08-29 11:41:10 -0700
commit77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273 (patch)
tree969937ec44ce5ddf9447b074aa15314e0b9e8e95 /doc/lispref/modes.texi
parente98b4715bb986524bde9356b62429af9786ae716 (diff)
parentdf2f6fb7fc4b79834ae40db8be2ccdc1e4a273f1 (diff)
downloademacs-77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273.tar.gz
emacs-77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273.tar.bz2
emacs-77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273.zip
Merge remote-tracking branch 'origin/master' into feature/tree-sitter
Diffstat (limited to 'doc/lispref/modes.texi')
-rw-r--r--doc/lispref/modes.texi27
1 files changed, 20 insertions, 7 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 2e40cb25ef8..ba8b548554b 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -271,7 +271,7 @@ normal-mode}), but tries to force it not to choose any modes in
@defun clean-mode
Changing the major mode clears out most local variables, but it
-doesn't remove all artefacts in the buffer (like text properties and
+doesn't remove all artifacts in the buffer (like text properties and
overlays). It's rare to change a buffer from one major mode to
another (except from @code{fundamental-mode} to everything else), so
this is usually not a concern. It can sometimes be convenient (mostly
@@ -1356,11 +1356,10 @@ the conventions listed above:
;; @r{Create the keymap for this mode.}
@group
(defvar-keymap text-mode-map
- "C-M-i" #'ispell-complete-word
- @dots{})
- "Keymap for `text-mode'.
-Many other modes, such as `mail-mode', `outline-mode' and
-`indented-text-mode', inherit all the commands defined in this map.")
+ :doc "Keymap for `text-mode'.
+Many other modes, such as `mail-mode' and `outline-mode', inherit all
+the commands defined in this map."
+ "C-M-i" #'ispell-complete-word)
@end group
@end smallexample
@@ -3476,7 +3475,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}.
@@ -3496,6 +3496,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