From 8e1ff5b7b017425ada055dbbe6367fa8c1a44504 Mon Sep 17 00:00:00 2001 From: Nicholas Hubbard Date: Thu, 7 Apr 2022 11:27:22 -0400 Subject: Guard against creating frame global perspective implicitly. --- perspective.el | 9 +++++---- 1 file 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. -- cgit v1.0