Function: font-lock-refresh-defaults

font-lock-refresh-defaults is a byte-compiled function defined in font-lock.el.gz.

Signature

(font-lock-refresh-defaults)

Documentation

Restart fontification in current buffer after recomputing from defaults.

Recompute fontification variables using font-lock-defaults and font-lock-maximum-decoration. Then restart fontification.

Use this function when you have changed any of the above variables directly.

Note: This function will erase modifications done by font-lock-add-keywords or font-lock-remove-keywords, but will preserve hi-lock-mode(var)/hi-lock-mode(fun) highlighting patterns.

Source Code

;; Defined in /usr/src/emacs/lisp/font-lock.el.gz
(defun font-lock-refresh-defaults ()
  "Restart fontification in current buffer after recomputing from defaults.
Recompute fontification variables using `font-lock-defaults' and
`font-lock-maximum-decoration'.  Then restart fontification.

Use this function when you have changed any of the above
variables directly.

Note: This function will erase modifications done by
`font-lock-add-keywords' or `font-lock-remove-keywords', but will
preserve `hi-lock-mode' highlighting patterns."
  (font-lock-mode -1)
  (kill-local-variable 'font-lock-set-defaults)
  (font-lock-mode 1))