From db227a8c2572f9985370325eca9f47d697531697 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 18 Jul 2024 20:33:37 +0200 Subject: flip an if clause --- lisp/mastodon-toot.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'lisp/mastodon-toot.el') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index e1d7259..4b1e225 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1849,20 +1849,20 @@ Added to `after-change-functions' in new toot buffers." "Select draft toot: " (multisession-value mastodon-toot-draft-toots-list) nil t))) - (if (mastodon-toot--compose-buffer-p) - (when (and (not (mastodon-toot--empty-p :text-only)) - (y-or-n-p "Replace current text with draft?")) - (setf (multisession-value mastodon-toot-draft-toots-list) - (cl-pushnew mastodon-toot-current-toot-text - (multisession-value mastodon-toot-draft-toots-list))) - (goto-char - (cdr (mastodon-tl--find-property-range 'toot-post-header - (point-min)))) - (kill-region (point) (point-max)) - ;; to not save to kill-ring: - ;; (delete-region (point) (point-max)) - (insert text)) - (mastodon-toot--compose-buffer nil nil nil text))) + (if (not (mastodon-toot--compose-buffer-p)) + (mastodon-toot--compose-buffer nil nil nil text) + (when (and (not (mastodon-toot--empty-p :text-only)) + (y-or-n-p "Replace current text with draft?")) + (setf (multisession-value mastodon-toot-draft-toots-list) + (cl-pushnew mastodon-toot-current-toot-text + (multisession-value mastodon-toot-draft-toots-list))) + (goto-char + (cdr (mastodon-tl--find-property-range 'toot-post-header + (point-min)))) + (kill-region (point) (point-max)) + ;; to not save to kill-ring: + ;; (delete-region (point) (point-max)) + (insert text)))) (unless (mastodon-toot--compose-buffer-p) (mastodon-toot--compose-buffer)) (message "No drafts available."))) -- cgit v1.2.3