diff options
| author | Nicholas Hubbard <nicholashubbard@posteo.net> | 2022-04-07 11:27:22 -0400 |
|---|---|---|
| committer | Nicholas Hubbard <nicholashubbard@posteo.net> | 2022-04-07 11:27:22 -0400 |
| commit | 8e1ff5b7b017425ada055dbbe6367fa8c1a44504 (patch) | |
| tree | 8316cc76aac76c31d7561376d9e2798ea3e5f8db | |
| parent | 861b5012bfb7a78955547b4a75f13a90a9a63d5b (diff) | |
Guard against creating frame global perspective implicitly.
| -rw-r--r-- | perspective.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/perspective.el b/perspective.el index 7e33f03..a0aab7b 100644 --- a/perspective.el +++ b/perspective.el @@ -195,10 +195,11 @@ the frame global perspective." (persp-current-buffers) (delete-dups (append (persp-current-buffers) - (with-perspective persp-frame-global-perspective-name - (if persp-frame-global-perspective-include-scratch-buffer - (persp-current-buffers) - (remove (persp-get-scratch-buffer) (persp-current-buffers)))))))) + (when (member persp-frame-global-perspective-name (persp-names)) + (with-perspective persp-frame-global-perspective-name + (if persp-frame-global-perspective-include-scratch-buffer + (persp-current-buffers) + (remove (persp-get-scratch-buffer) (persp-current-buffers))))))))) (defun persp-current-buffer-names (&optional include-global) "Return a list of names of all living buffers in the current perspective. |
