mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-02 14:53:38 -05:00
Refactor auto-add-buffer functionality
Use built-in mechanism for auto-adding buffers to current workspace, rather than reinvent the wheel.
This commit is contained in:
@@ -484,17 +484,6 @@ the next."
|
||||
;; Hooks
|
||||
;;
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspaces|auto-add-buffer ()
|
||||
"Auto-associate buffers with perspectives upon opening them.
|
||||
|
||||
Allows a perspective-specific buffer list via `+workspaces-buffer-list'."
|
||||
(when (and persp-mode
|
||||
(not persp-temporarily-display-buffer)
|
||||
(doom-real-buffer-p))
|
||||
(persp-add-buffer (current-buffer) (get-current-persp) nil)
|
||||
(force-mode-line-update t)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspaces|delete-associated-workspace (&optional frame)
|
||||
"Delete workspace associated with current frame.
|
||||
|
Reference in New Issue
Block a user