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:
parent
537cc9e1ed
commit
83ba527afd
3 changed files with 7 additions and 23 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue