diff options
| author | Nicholas Hubbard <nicholashubbard@posteo.net> | 2022-04-04 00:21:33 -0400 |
|---|---|---|
| committer | Nicholas Hubbard <nicholashubbard@posteo.net> | 2022-04-04 00:21:33 -0400 |
| commit | d79682da438b5e9f0ed49b32c8d741df5c269f98 (patch) | |
| tree | 36de0e43922d59aa1f76f9b2682dd2fc8b65d76d /perspective.el | |
| parent | d3afc52ed098b713b6607943bd1ee0ef899db267 (diff) | |
Wrap with-perspectives' BODY arg in a progn and return it.
Diffstat (limited to 'perspective.el')
| -rw-r--r-- | perspective.el | 8 |
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. |
