aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-13 12:17:24 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-13 12:17:24 +0200
commit946758ebf2fb9ffc8773c2fa072c79fea143d24c (patch)
tree9198d0a08eb350f93f3fb5f732b4b6062101eec0 /lisp/mastodon-toot.el
parentf268afe2d4e00482fc7612d312eb7a744bd8eb7b (diff)
parent154d984a7af43b5e0caa9f3df7ca49f0def1dab1 (diff)
Merge branch 'develop' into update-meta-fields
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el15
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.