aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 666d1b0..0cd66db 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1863,17 +1863,17 @@ Added to `after-change-functions' in new toot buffers."
(defun mastodon-toot--delete-draft-toot ()
"Prompt for a draft toot and delete it."
(interactive)
- (if (multisession-value mastodon-toot-draft-toots-list)
- (let ((draft (completing-read
- "Select draft to delete: "
- (multisession-value mastodon-toot-draft-toots-list)
- nil t)))
- (setf (multisession-value mastodon-toot-draft-toots-list)
- (cl-delete draft
- (multisession-value mastodon-toot-draft-toots-list)
- :test #'equal))
- (message "Draft deleted!"))
- (message "No drafts to delete.")))
+ (if (not (multisession-value mastodon-toot-draft-toots-list))
+ (message "No drafts to delete.")
+ (let ((draft (completing-read
+ "Select draft to delete: "
+ (multisession-value mastodon-toot-draft-toots-list)
+ nil t)))
+ (setf (multisession-value mastodon-toot-draft-toots-list)
+ (cl-delete draft
+ (multisession-value mastodon-toot-draft-toots-list)
+ :test #'equal))
+ (message "Draft deleted!"))))
(defun mastodon-toot--delete-all-drafts ()
"Delete all drafts."