Function: jit-lock-debug-mode

jit-lock-debug-mode is an interactive and byte-compiled function defined in jit-lock.el.gz.

Signature

(jit-lock-debug-mode &optional ARG)

Documentation

Minor mode to help debug code run from jit-lock.

This is a minor mode. If called interactively, toggle the Jit-Lock-Debug mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate (default-value \=jit-lock-debug-mode)'.

The mode's hook is called both when the mode is enabled and when it is disabled.

When this minor mode is enabled, jit-lock runs as little code as possible during redisplay and moves the rest to a timer, where things like debug-on-error and Edebug can be used.

Probably introduced at or before Emacs version 24.4.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/jit-lock.el.gz
(define-minor-mode jit-lock-debug-mode
  "Minor mode to help debug code run from jit-lock.

When this minor mode is enabled, jit-lock runs as little code as possible
during redisplay and moves the rest to a timer, where things
like `debug-on-error' and Edebug can be used."
  :global t
  (when jit-lock-defer-timer
    (cancel-timer jit-lock-defer-timer)
    (setq jit-lock-defer-timer nil))
  (when jit-lock-debug-mode
    (setq jit-lock-defer-timer
          (run-with-idle-timer 0 t #'jit-lock--debug-fontify))))