aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Hubbard <nicholashubbard@posteo.net>2022-04-04 00:21:33 -0400
committerNicholas Hubbard <nicholashubbard@posteo.net>2022-04-04 00:21:33 -0400
commitd79682da438b5e9f0ed49b32c8d741df5c269f98 (patch)
tree36de0e43922d59aa1f76f9b2682dd2fc8b65d76d
parentd3afc52ed098b713b6607943bd1ee0ef899db267 (diff)
Wrap with-perspectives' BODY arg in a progn and return it.
-rw-r--r--perspective.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/perspective.el b/perspective.el
index 675cbf4..97fa85f 100644
--- a/perspective.el
+++ b/perspective.el
@@ -548,13 +548,15 @@ REQUIRE-MATCH can take the same values as in `completing-read'."
(let ((old (cl-gensym)))
`(progn
(let ((,old (with-current-perspective (persp-current-name)))
- (last-persp-cache (persp-last)))
+ (last-persp-cache (persp-last))
+ (result))
(unwind-protect
(progn
(persp-switch ,name 'norecord)
- ,@body)
+ (setq result (progn ,@body)))
(when ,old (persp-switch ,old 'norecord)))
- (set-frame-parameter nil 'persp--last last-persp-cache)))))
+ (set-frame-parameter nil 'persp--last last-persp-cache)
+ result))))
(defun persp-reset-windows ()
"Remove all windows, ensure the remaining one has no window parameters.