Variable: jit-lock-contextually

jit-lock-contextually is a customizable variable defined in jit-lock.el.gz.

Value

syntax-driven

Documentation

If non-nil, fontification should be syntactically true.

If nil, refontification occurs only on lines that were modified. This means where modification on a line causes syntactic change on subsequent lines, those subsequent lines are not refontified to reflect their new context. If t, fontification occurs on those lines modified and all subsequent lines. This means those subsequent lines are refontified to reflect their new syntactic context, after jit-lock-context-time seconds. If any other value, e.g., syntax-driven, it means refontification of subsequent lines to reflect their new syntactic context may or may not occur after jit-lock-context-time, depending on the font-lock definitions of the buffer. Specifically, if font-lock-keywords-only is nil in a buffer, which generally means the syntactic fontification is done using the buffer mode's syntax table, the syntactic refontification will be triggered (because in that case font-lock calls jit-lock-register to set up for syntactic refontification, and sets the buffer-local value of jit-lock-contextually to t).

The value of this variable is used when JIT Lock mode is turned on.

Probably introduced at or before Emacs version 22.1.

Aliases

jit-lock-defer-contextually (obsolete since 30.1)

Source Code

;; Defined in /usr/src/emacs/lisp/jit-lock.el.gz
(defcustom jit-lock-contextually 'syntax-driven
  "If non-nil, fontification should be syntactically true.
If nil, refontification occurs only on lines that were modified.  This
means where modification on a line causes syntactic change on subsequent lines,
those subsequent lines are not refontified to reflect their new context.
If t, fontification occurs on those lines modified and all subsequent lines.
This means those subsequent lines are refontified to reflect their new
syntactic context, after `jit-lock-context-time' seconds.
If any other value, e.g., `syntax-driven', it means refontification of
subsequent lines to reflect their new syntactic context may or may not
occur after `jit-lock-context-time', depending on the font-lock
definitions of the buffer.  Specifically, if `font-lock-keywords-only'
is nil in a buffer, which generally means the syntactic fontification
is done using the buffer mode's syntax table, the syntactic
refontification will be triggered (because in that case font-lock
calls `jit-lock-register' to set up for syntactic refontification,
and sets the buffer-local value of `jit-lock-contextually' to t).

The value of this variable is used when JIT Lock mode is turned on."
  :type '(choice (const :tag "never" nil)
		 (const :tag "always" t)
		 (other :tag "syntax-driven" syntax-driven)))