feature/workspaces: fix recursive load errors on 25.x #470
+workspaces|protect-buffers-in-other-persps was unnecessary, in any case.
This commit is contained in:
parent
462b1f7853
commit
d5683ba681
2 changed files with 2 additions and 10 deletions
|
@ -464,12 +464,6 @@ Allows a perspective-specific buffer list via `+workspaces-buffer-list'."
|
|||
(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
|
||||
it, don't kill it)."
|
||||
(not (persp-other-persps-with-buffer-except-nil (current-buffer))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspaces|delete-associated-workspace (&optional frame)
|
||||
"Delete workspace associated with current frame.
|
||||
|
|
|
@ -114,9 +114,8 @@ Uses `+workspaces-main' to determine the name of the main workspace."
|
|||
;; kill-buffer-query-functions
|
||||
(remove-hook 'kill-buffer-query-functions 'persp-kill-buffer-query-function)
|
||||
(add-hook 'kill-buffer-query-functions 'persp-kill-buffer-query-function t)
|
||||
|
||||
;;
|
||||
(add-hook 'kill-buffer-query-functions #'+workspaces|protect-buffers-in-other-persps)
|
||||
;; Ensure buffers we've opened/switched to are auto-added to the
|
||||
;; current perspective
|
||||
(add-hook 'doom-after-switch-buffer-hook #'+workspaces|auto-add-buffer)
|
||||
|
||||
;; Remap `buffer-list' to current workspace's buffers in
|
||||
|
@ -124,6 +123,5 @@ Uses `+workspaces-main' to determine the name of the main workspace."
|
|||
(advice-add #'doom-buffer-list :override #'+workspace-buffer-list))
|
||||
(t
|
||||
(remove-hook 'doom-after-switch-buffer-hook #'+workspaces|auto-add-buffer)
|
||||
(remove-hook 'kill-buffer-query-functions #'+workspaces|protect-buffers-in-other-persps)
|
||||
(advice-remove #'doom-buffer-list #'+workspace-buffer-list)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue