aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine Vetoshev <vetoshev@gmail.com>2026-03-31 07:11:53 -0700
committerConstantine Vetoshev <vetoshev@gmail.com>2026-03-31 07:11:53 -0700
commit1271ac579798fe65ba2246a72a44efb1eeeba2ec (patch)
tree456bc9e097a81b9731fab91369f1b563352ef152
parent47c083a7cee9849fe5d36759ad141a0f5df61e77 (diff)
Try to fix Emacs 24 compatibility.
-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."