Function: font-lock-update

font-lock-update is an interactive and byte-compiled function defined in font-lock.el.gz.

Signature

(font-lock-update &optional ARG)

Documentation

Update the syntax highlighting in this buffer.

Refontify the accessible portion of this buffer, or enable Font Lock mode in this buffer if it is currently disabled. With prefix ARG, toggle Font Lock mode.

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/font-lock.el.gz
(defun font-lock-update (&optional arg)
  "Update the syntax highlighting in this buffer.
Refontify the accessible portion of this buffer, or enable Font Lock mode
in this buffer if it is currently disabled.  With prefix ARG, toggle Font
Lock mode."
  (interactive "P")
  (save-excursion
    (if (and (not arg) font-lock-mode)
        (font-lock-fontify-region (point-min) (point-max))
      (font-lock-unfontify-region (point-min) (point-max))
      (font-lock-mode 'toggle))))