aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-07-30 09:24:50 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-07-30 09:27:29 +0200
commitf8ee682bb403b5488294e69c464149626221f7c7 (patch)
treeb04cb3ada561084fe6ff9ec8d50509c37355f9cc /lisp
parentd7816ab59fdf64fc64adf3185052ee10931d7076 (diff)
flip an if clause
Diffstat (limited to 'lisp')
-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."