aboutsummaryrefslogtreecommitdiff
path: root/perspective.el
diff options
context:
space:
mode:
Diffstat (limited to 'perspective.el')
-rw-r--r--perspective.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/perspective.el b/perspective.el
index 8bee8d9..962a500 100644
--- a/perspective.el
+++ b/perspective.el
@@ -1006,9 +1006,10 @@ If NORECORD is non-nil, pass it through to `switch-to-buffer' and
(let ((other-persp (persp-buffer-in-other-p buffer)))
(when (eq (car-safe other-persp) (selected-frame))
(persp-switch (cdr other-persp) norecord))
- (if-let ((window (get-buffer-window buffer (selected-frame))))
- (select-window window norecord)
- (switch-to-buffer buffer norecord))))))))
+ (let ((window (get-buffer-window buffer (selected-frame))))
+ (if window
+ (select-window window norecord)
+ (switch-to-buffer buffer norecord)))))))))
(defun persp-switch-to-buffer (buffer-or-name &optional norecord)
"Like `switch-to-buffer', but switches to another perspective if necessary."