Function: treemacs--remove-project-from-current-workspace

treemacs--remove-project-from-current-workspace is a byte-compiled function defined in treemacs-workspaces.el.

Signature

(treemacs--remove-project-from-current-workspace PROJECT)

Documentation

Remove PROJECT from the current workspace.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-workspaces.el
(define-inline treemacs--remove-project-from-current-workspace (project)
  "Remove PROJECT from the current workspace."
  (inline-letevals (project)
    (inline-quote
     (progn
       (setf (treemacs-workspace->projects (treemacs-current-workspace))
             (delete ,project (treemacs-workspace->projects (treemacs-current-workspace))))
       ;; also reset the cached buffers' projects
       (dolist (buffer (buffer-list))
         (with-current-buffer buffer
           (when (equal treemacs--project-of-buffer ,project)
             (setq treemacs--project-of-buffer nil))))))))