aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2020-04-08 18:33:52 +0300
committerEli Zaretskii2020-04-08 18:33:52 +0300
commit18d1bc0a09db280cc1653706f7f8022786f77c94 (patch)
tree8d07889770657d7555af2412f5f57f038004a844 /lisp
parent08486f4cae8e209cd70bd13534beff336faffd9e (diff)
downloademacs-18d1bc0a09db280cc1653706f7f8022786f77c94.tar.gz
emacs-18d1bc0a09db280cc1653706f7f8022786f77c94.zip
Improve documentation of 'jit-lock-contextually'
* lisp/jit-lock.el (jit-lock-contextually): Clarify the jit-lock operation when 'jit-lock-contextually' is non-nil and non-t. * doc/lispref/modes.texi (Syntactic Font Lock) (Other Font Lock Variables): Document the relation between 'jit-lock-register', 'font-lock-keywords-only', and syntactic refontification.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/jit-lock.el22
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index d73cd74da0b..95cc02197c1 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -101,16 +101,22 @@ See also `jit-lock-stealth-nice'."
101 101
102(defvaralias 'jit-lock-defer-contextually 'jit-lock-contextually) 102(defvaralias 'jit-lock-defer-contextually 'jit-lock-contextually)
103(defcustom jit-lock-contextually 'syntax-driven 103(defcustom jit-lock-contextually 'syntax-driven
104 "If non-nil, means fontification should be syntactically true. 104 "If non-nil, fontification should be syntactically true.
105If nil, means fontification occurs only on those lines modified. This 105If nil, refontification occurs only on lines that were modified. This
106means where modification on a line causes syntactic change on subsequent lines, 106means where modification on a line causes syntactic change on subsequent lines,
107those subsequent lines are not refontified to reflect their new context. 107those subsequent lines are not refontified to reflect their new context.
108If t, means fontification occurs on those lines modified and all 108If t, fontification occurs on those lines modified and all subsequent lines.
109subsequent lines. This means those subsequent lines are refontified to reflect 109This means those subsequent lines are refontified to reflect their new
110their new syntactic context, after `jit-lock-context-time' seconds. 110syntactic context, after `jit-lock-context-time' seconds.
111If any other value, e.g., `syntax-driven', means syntactically true 111If any other value, e.g., `syntax-driven', it means refontification of
112fontification occurs only if syntactic fontification is performed using the 112subsequent lines to reflect their new syntactic context may or may not
113buffer mode's syntax table, i.e., only if `font-lock-keywords-only' is nil. 113occur after `jit-lock-context-time', depending on the the font-lock
114definitions of the buffer. Specifically, if `font-lock-keywords-only'
115is nil in a buffer, which generally means the syntactic fontification
116is done using the buffer mode's syntax table, the syntactic
117refontification will be triggered (because in that case font-lock
118calls `jit-lock-register' to set up for syntactic refontification,
119and sets the buffer-local value of `jit-lock-contextually' to t).
114 120
115The value of this variable is used when JIT Lock mode is turned on." 121The value of this variable is used when JIT Lock mode is turned on."
116 :type '(choice (const :tag "never" nil) 122 :type '(choice (const :tag "never" nil)