Function: haskell-cabal-buffers-clean

haskell-cabal-buffers-clean is a natively compiled function defined in haskell-cabal.el.

Signature

(haskell-cabal-buffers-clean &optional BUFFER)

Documentation

Refresh list of known cabal buffers.

Check each buffer in variable haskell-cabal-buffers and remove it from list if one of the following conditions are hold:
+ buffer is killed;
+ buffer's mode is not derived from haskell-cabal-mode;
+ buffer is a BUFFER (if given).

Source Code

;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-cabal.el
(defun haskell-cabal-buffers-clean (&optional buffer)
  "Refresh list of known cabal buffers.

Check each buffer in variable `haskell-cabal-buffers' and remove
it from list if one of the following conditions are hold:
+ buffer is killed;
+ buffer's mode is not derived from `haskell-cabal-mode';
+ buffer is a BUFFER (if given)."
  (let ((bufs ()))
    (dolist (buf haskell-cabal-buffers)
      (if (and (buffer-live-p buf)
               (not (eq buf buffer))
               (with-current-buffer buf (derived-mode-p 'haskell-cabal-mode)))
          (push buf bufs)))
    (setq haskell-cabal-buffers bufs)))