From 1271ac579798fe65ba2246a72a44efb1eeeba2ec Mon Sep 17 00:00:00 2001 From: Constantine Vetoshev Date: Tue, 31 Mar 2026 07:11:53 -0700 Subject: Try to fix Emacs 24 compatibility. --- perspective.el | 7 ++++--- 1 file 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." -- cgit v1.0