[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making a function than can only be used interactively
From: |
carlmarcos |
Subject: |
Re: Making a function than can only be used interactively |
Date: |
Fri, 8 Jul 2022 00:14:28 +0200 (CEST) |
--
Sent with Tutanota, enjoy secure & ad-free emails.
Jul 7, 2022, 21:28 by incal@dataswamp.org:
> carlmarcos--- via Users list for the GNU Emacs text editor wrote:
>
>>> A word such as "interactive" has different meanings.
>>>
>>
>> What different meanings?
>>
>
> So interactive/non-interactive 101 ...
>
> M-x - that's interactive
>
> Keystroke - interactive!
>
> "interactive" means (interactive "nX: \n") is used to assign
> the argument values to the formal parameters.
>
> Compare "from Lisp" or non-interactive use which looks like
> this:
>
> (from-lisp x) - non-interactive, i.e. (interactive "...")
> isn't used, but you see that x is provided so no worries.
>
> A function that is interactive is also called a command!
>
> That's all I know ... what more do you want?
>
I want to know a few specific things. If I want to use the prefix argument, I
should include
a variable in the argument list, right? Let us call the variable "prefix".
Now, should the prefix
be mandatory or optional? Should it always be the first argument?
(defun funname (prefix arg-a arg-b)
"docstring"
(interactive "P\ns Name:\n s City")
(message "executed funname"))
> You gotta give me more and more
> Cuz you're the girl that I adore
> --Zodiac Evermore, Netherlands 1996
> https://dataswamp.org/~incal/vidz/evermore-kate.mp4
>
> --
> underground experts united
> https://dataswamp.org/~incal
>
- Re: Making a function than can only be used interactively, (continued)
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/04
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/04
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/04
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/04
- Re: Making a function than can only be used interactively, Jean Louis, 2022/07/05
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/06
- Re: Making a function than can only be used interactively, Jean Louis, 2022/07/07
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/07
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/07
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/07
- Re: Making a function than can only be used interactively,
carlmarcos <=
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/07
- Re: Making a function than can only be used interactively, Yuri Khan, 2022/07/08
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/08
- Re: Making a function than can only be used interactively, Yuri Khan, 2022/07/08
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/08
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/08
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/10
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/08
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/08
- Message not available
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/08