Function: cider-ns--mark-reloaded

cider-ns--mark-reloaded is a byte-compiled function defined in cider-ns.el.

Signature

(cider-ns--mark-reloaded NAMESPACES)

Documentation

Resync the load-state indicators of open buffers in NAMESPACES.

For each live Clojure buffer whose namespace is in NAMESPACES (a list of name strings) and that has no unsaved edits, refresh the evaluation fringe indicators and the namespace load-state marker. Modified buffers are left alone, since reloading happens from disk and an unsaved buffer is genuinely out of sync with what was loaded.

This goes through cider-file-loaded-hook (like cider-load-buffer does), so its other subscribers also run for the reloaded buffers - notably cider-auto-test-mode(var)/cider-auto-test-mode(fun) will re-run their tests.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-ns.el
(defun cider-ns--mark-reloaded (namespaces)
  "Resync the load-state indicators of open buffers in NAMESPACES.
For each live Clojure buffer whose namespace is in NAMESPACES (a list of
name strings) and that has no unsaved edits, refresh the evaluation fringe
indicators and the namespace load-state marker.  Modified buffers are left
alone, since reloading happens from disk and an unsaved buffer is genuinely
out of sync with what was loaded.

This goes through `cider-file-loaded-hook' (like `cider-load-buffer' does),
so its other subscribers also run for the reloaded buffers - notably
`cider-auto-test-mode' will re-run their tests."
  (when namespaces
    (dolist (buf (buffer-list))
      (with-current-buffer buf
        (when (and (derived-mode-p 'clojure-mode 'clojure-ts-mode)
                   (not (buffer-modified-p))
                   (member (cider-current-ns 'no-default) namespaces))
          (cider--mark-loaded))))))