aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatalie Weizenbaum <nex342@gmail.com>2014-12-12 13:33:29 -0800
committerNatalie Weizenbaum <nex342@gmail.com>2014-12-12 13:33:29 -0800
commit39af8e656dcfd08da969397ebc71dfd0b30a15e5 (patch)
treeed58cad3b0959bbe0ffb2ca86fa21c8c0268cd6c
parentff172f7171fc9cc2bdc51086f6ccfb399d2a0a2e (diff)
parentc5f9852ee1705b6b833f6f27478b689d81e7b3eb (diff)
Merge pull request #38 from csrhodes/killing-perspectives
only kill live buffers
-rw-r--r--perspective.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/perspective.el b/perspective.el
index e739b6d..4e7bac0 100644
--- a/perspective.el
+++ b/perspective.el
@@ -541,8 +541,9 @@ perspective that has the buffer."
See also `persp-switch' and `persp-add-buffer'."
(interactive "bRemove buffer from perspective: \n")
(setq buffer (get-buffer buffer))
- ; Only kill the buffer if no other perspectives are using it
- (cond ((not (persp-buffer-in-other-p buffer))
+ (cond ((not (buffer-live-p buffer)))
+ ;; Only kill the buffer if no other perspectives are using it
+ ((not (persp-buffer-in-other-p buffer))
(kill-buffer buffer))
;; Make the buffer go away if we can see it.
;; TODO: Is it possible to tell if it's visible at all,