Function: cider-refresh-dynamic-font-lock

cider-refresh-dynamic-font-lock is an interactive and byte-compiled function defined in cider-mode.el.

Signature

(cider-refresh-dynamic-font-lock &optional NS)

Documentation

Ensure that the current buffer has up-to-date font-lock rules.

NS defaults to cider-current-ns, and it can also be a dict describing the namespace itself.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-mode.el
(defun cider-refresh-dynamic-font-lock (&optional ns)
  "Ensure that the current buffer has up-to-date font-lock rules.
NS defaults to `cider-current-ns', and it can also be a dict describing the
namespace itself."
  (interactive)
  (when (and cider-font-lock-dynamically
             font-lock-mode)
    (font-lock-remove-keywords nil cider--dynamic-font-lock-keywords)
    (when-let* ((ns (or ns (cider-current-ns)))
                (symbols (cider-resolve-ns-symbols ns)))
      (setq-local cider--dynamic-font-lock-keywords
                  (cider--compile-font-lock-keywords
                   symbols (cider-resolve-ns-symbols (cider-resolve-core-ns))))
      (font-lock-add-keywords nil cider--dynamic-font-lock-keywords 'end))
    (font-lock-flush)))