* Handling read-multiple-choice for conditional testing with symbols
@ 2024-12-09 17:54 Heime via Users list for the GNU Emacs text editor
2024-12-12 10:53 ` Joel Reicher
0 siblings, 1 reply; 2+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-12-09 17:54 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
I want to use read-multiple-choice to be able to enter a sequence
of commands. But I am testing upon symbols not strings.
Does read-multiple-choice always require ?g with a single letter?
Does it always require
(defun troller (actm-seqr)
"Handle `icomplete-mode'."
;; =============================================================
(interactive
(list
(let ( (cseq '((?g "go" "Activate the feature")
(?d "deact" "Deactivate the feature")
(?n "nogo" "Do not activate"))) )
(cadr (read-multiple-choice "ACTM-SEQR: " cseq)))))
;; =============================================================
;; Make ACTM-SEQR a list, even if a single symbol is passed.
(let ( (actm-seqr
(if (listp actm-seqr) actm-seqr (list actm-seqr))) )
(catch 'exit
(dolist (actm actm-seqr)
(pcase actm ; Cont'd at CASE
('go
(ichorz-launch 'go))
('deact
(when (bound-and-true-p icomplete-mode)
(icomplete-mode -1)))
('nogo
(throw 'exit "Exit on NOGO"))
(_
(message " ACTM Unrecognised: %s" actm)
(throw 'exit "Exit on ACTM Unrecognised")) )))) )
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Handling read-multiple-choice for conditional testing with symbols
2024-12-09 17:54 Handling read-multiple-choice for conditional testing with symbols Heime via Users list for the GNU Emacs text editor
@ 2024-12-12 10:53 ` Joel Reicher
0 siblings, 0 replies; 2+ messages in thread
From: Joel Reicher @ 2024-12-12 10:53 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor; +Cc: Heime
Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> I want to use read-multiple-choice to be able to enter a
> sequence of commands. But I am testing upon symbols not
> strings.
>
> Does read-multiple-choice always require ?g with a single
> letter?
Which part of the documentation is unclear?
Regards,
- Joel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-12 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 17:54 Handling read-multiple-choice for conditional testing with symbols Heime via Users list for the GNU Emacs text editor
2024-12-12 10:53 ` Joel Reicher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).