I want a function designed to accept two
completing-read calls, one to set
nstruc that holds either
actm that holds either
"alpha α" or
The two variables are then intended to be used inside the body of the function, within the
pcase construct shown.
(defun greek (actm) "TODO" (interactive (list (let ( nstruc (csel '("Glyph" "Command") ) (cseq '("alpha α" "beta β")) ) (setq nstruc (completing-read "Instruc: " csel nil t nil)) (completing-read "Letter: " cseq nil t nil) ))) (pcase actm ("alpha α" (insert "\\alpha")) ("beta β" (insert "\\beta")) )
Perhaps I do not need to put the
completing-read calls in the interactive clause, but in the body of the function.
(defun my-custom-function () (interactive) (let ((first-choice (completing-read "Enter your first choice: ")) (second-choice (completing-read "Enter your second choice: "))) (message "First choice: %s, Second choice: %s" first-choice second-choice)))
When you use this function, Emacs will prompt you to enter two choices, and it will display the entered choices in the message area.