feature/workspaces: use new switch-buffer hooks

This commit is contained in:
Henrik Lissner 2018-03-14 18:31:48 -04:00
parent 4edb7999e9
commit d84222b6d0
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 16 additions and 15 deletions

View file

@ -453,6 +453,17 @@ 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|protect-buffers-in-other-persps ()
"Return nil if this buffer is present in other perspectives/workspaces (bury