[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Iinteractive function allowing multiple inputs
From: |
Jean Louis |
Subject: |
Re: Iinteractive function allowing multiple inputs |
Date: |
Mon, 9 Dec 2024 23:43:00 +0300 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
* Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
[2024-12-09 21:42]:
>
>
> Is there a way for an interactive function to allow multiple inputs?
(defun my-multi-input-function (input1 input2 input3)
"An example function that takes three inputs and displays them."
(interactive
(list
(read-string "Enter the first input: ")
(read-string "Enter the second input: ")
(read-string "Enter the third input: ")))
(message "You entered: %s, %s, %s" input1 input2 input3))
;; To use the function, execute it with M-x my-multi-input-function
Me personally, I don't like that style, I like using `let' and reading
what I need to read within function, while leaving (interactive) as it
is.
--
Jean Louis
- Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs,
Jean Louis <=
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Jean Louis, 2024/12/09
- Re: Iinteractive function allowing multiple inputs, Heime, 2024/12/09