diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-06-02 17:58:13 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-06-02 17:58:13 +0200 |
commit | d68cf7104b59e0c98743359bc566d7faf4a07776 (patch) | |
tree | 493927c6d8a22b62bc9234559aa495d08d36911f /lisp/mastodon-toot.el | |
parent | de2937d9fa1a35cbc05e1c3d0dd6856d393b4111 (diff) |
mastodon-toot--clear-poll
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index d21084b..d38b66f 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -279,6 +279,7 @@ send.") (define-key map (kbd "C-c C-a") #'mastodon-toot--attach-media) (define-key map (kbd "C-c !") #'mastodon-toot--clear-all-attachments) (define-key map (kbd "C-c C-p") #'mastodon-toot--create-poll) + (define-key map (kbd "C-c C-o") #'mastodon-toot--clear-poll) (define-key map (kbd "C-c C-l") #'mastodon-toot--set-toot-language) (define-key map (kbd "C-c C-s") #'mastodon-toot--schedule-toot) map) @@ -1428,6 +1429,14 @@ LENGTH is the maximum character length allowed for a poll option." ("14 days" . ,(number-to-string (* 60 60 24 14))) ("30 days" . ,(number-to-string (* 60 60 24 30))))) +(defun mastodon-toot--clear-poll () + "Remove poll from toot compose buffer. +Sets `mastodon-toot-poll' to nil." + (interactive) + (if (not mastodon-toot-poll) + (user-error "No poll?") + (setq mastodon-toot-poll nil) + (mastodon-toot--update-status-fields))) ;;; SCHEDULE |