diff options
| author | Constantine Vetoshev <vetoshev@gmail.com> | 2026-03-31 07:11:53 -0700 |
|---|---|---|
| committer | Constantine Vetoshev <vetoshev@gmail.com> | 2026-03-31 07:11:53 -0700 |
| commit | 1271ac579798fe65ba2246a72a44efb1eeeba2ec (patch) | |
| tree | 456bc9e097a81b9731fab91369f1b563352ef152 | |
| parent | 47c083a7cee9849fe5d36759ad141a0f5df61e77 (diff) | |
Try to fix Emacs 24 compatibility.
| -rw-r--r-- | perspective.el | 7 |
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." |
