Function: font-lock-fontify-buffer

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

Signature

(font-lock-fontify-buffer &optional INTERACTIVELY)

Documentation

Fontify the current buffer the way the function font-lock-mode(var)/font-lock-mode(fun) would.

View in manual

Probably introduced at or before Emacs version 19.29.

Key Bindings

Aliases

vera-fontify-buffer (obsolete since 25.1)

Source Code

;; Defined in /usr/src/emacs/lisp/font-lock.el.gz
(defun font-lock-fontify-buffer (&optional interactively)
  "Fontify the current buffer the way the function `font-lock-mode' would."
  (declare
   ;; When called from Lisp, this function is a big mess.  The caller usually
   ;; expects one of the following behaviors:
   ;; - refresh the highlighting (because the font-lock-keywords have been
   ;;   changed).
   ;; - apply font-lock highlighting even if font-lock-mode is not enabled.
   ;; - reset the highlighting rules because font-lock-defaults
   ;;   has been changed (and then rehighlight everything).
   ;; Of course, this function doesn't do all of the above in all situations
   ;; (e.g. depending on whether jit-lock is in use) and it can't guess what
   ;; the caller wants.
   (interactive-only "use `font-lock-ensure' or `font-lock-flush' instead."))
  (interactive "p")
  (font-lock-set-defaults)
  (let ((font-lock-verbose (or font-lock-verbose interactively)))
    (funcall font-lock-fontify-buffer-function)))