diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-08 09:14:58 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-08 09:14:58 +0200 |
commit | 96fcaaa8d45eeec63199ac7cc11689dabdec08ee (patch) | |
tree | 1daf19b1b1d90e64a31f366859ae94c32a7c0c09 /lisp/mastodon-toot.el | |
parent | 48fb5dc0cdd09e39ad0d30582de8b9b9bd1ec269 (diff) |
revert prev-window-config let
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index d40395f..3fd445c 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -631,15 +631,15 @@ REPLY-ID, VISIBILITY, CW, SCHEDULED, and LANG are the properties to set." (defun mastodon-toot--kill (&optional cancel) "Kill `mastodon-toot-mode' buffer and window. CANCEL means the toot was not sent, so we save the toot text as a draft." - (unless (eq mastodon-toot-current-toot-text nil) - (when cancel - (cl-pushnew mastodon-toot-current-toot-text - mastodon-toot-draft-toots-list :test 'equal))) - ;; prevent some weird bug when cancelling a non-empty toot: - (delete #'mastodon-toot--save-toot-text after-change-functions) - (kill-buffer-and-window) - (mastodon-toot--restore-previous-window-config - mastodon-toot-previous-window-config)) + (let ((prev-window-config mastodon-toot-previous-window-config)) + (unless (eq mastodon-toot-current-toot-text nil) + (when cancel + (cl-pushnew mastodon-toot-current-toot-text + mastodon-toot-draft-toots-list :test 'equal))) + ;; prevent some weird bug when cancelling a non-empty toot: + (delete #'mastodon-toot--save-toot-text after-change-functions) + (kill-buffer-and-window) + (mastodon-toot--restore-previous-window-config prev-window-config))) (defun mastodon-toot--cancel () "Kill new-toot buffer/window. Does not POST content to Mastodon. |