From 93136d49b67539b703655ebae4561a7936df4e8e Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sat, 7 Aug 2010 23:41:34 -0700 Subject: Don't die when switch-to-buffer is passed nil. --- perspective.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perspective.el b/perspective.el index 21429d5..8e82594 100644 --- a/perspective.el +++ b/perspective.el @@ -546,7 +546,9 @@ is non-nil or with prefix arg, don't switch to the new perspective." "Add BUFFER to the current perspective. See also `persp-add-buffer'." - (persp-add-buffer (ad-get-arg 0))) + (let ((buf (ad-get-arg 0))) + (when buf + (persp-add-buffer buf)))) (defadvice recursive-edit (around persp-preserve-for-recursive-edit) "Preserve the current perspective when entering a recursive edit." -- cgit v1.0