From 7c9e5577f77da54d10bc0ed1426f0eff3570e3de Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 23 Oct 2024 21:29:41 +0200 Subject: boolean defcustom for transient poll --- lisp/mastodon-toot.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/mastodon-toot.el') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 4177062..efcbc72 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -168,6 +168,10 @@ By default fixed width fonts are used." :type '(boolean :tag "Enable using proportional rather than fixed \ width fonts")) +(defcustom mastodon-toot-poll-use-transient t + "Whether to use the transient menu to create a poll." + :type '(boolean)) + (defvar-local mastodon-toot--content-warning nil "The content warning of the current toot.") @@ -1401,6 +1405,12 @@ MAX is the maximum number set by their instance." (defun mastodon-toot--create-poll () "Prompt for new poll options and return as a list." (interactive) + (if mastodon-toot-poll-use-transient + (mastodon-create-poll) + (mastodon-toot--read-poll))) + +(defun mastodon-toot--read-poll () + "Read poll options." (let* ((instance (mastodon-instance-data)) (max-options (mastodon-toot--fetch-max-poll-options instance)) (count (mastodon-toot--read-poll-options-count max-options)) -- cgit v1.2.3