diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-13 12:17:24 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-13 12:17:24 +0200 |
commit | 946758ebf2fb9ffc8773c2fa072c79fea143d24c (patch) | |
tree | 9198d0a08eb350f93f3fb5f732b4b6062101eec0 /lisp/mastodon-toot.el | |
parent | f268afe2d4e00482fc7612d312eb7a744bd8eb7b (diff) | |
parent | 154d984a7af43b5e0caa9f3df7ca49f0def1dab1 (diff) |
Merge branch 'develop' into update-meta-fields
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 2f58bfb..5ec58dd 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -462,14 +462,13 @@ REPLY-ID, TOOT-VISIBILITY, and TOOT-CW of deleted toot are preseved." (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." - (with-current-buffer (get-buffer "*new toot*") - (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))) + (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)) (defun mastodon-toot--cancel () "Kill new-toot buffer/window. Does not POST content to Mastodon. |