[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: |
Sun, 3 Jul 2022 23:29:56 +0200 (CEST) |
Jul 3, 2022, 20:14 by help-gnu-emacs@gnu.org:
>> I do not want people to use the function non-interactively.
>>
>
> An interactive call is fundamentally a combination of "run the
> interactive spec to get the args, and then call the function with those
> args". So, in a sense you can't avoid it.
>
> But you can discourage non-interactive calls in various ways, depending
> on how important you think it is. The most standard way is to use
>
> (declare (interactive-only <foo>))
>
> so that the compiler will emit a warning when it sees a non-interactive
> call to that function (<foo> is the replacement you recommend for
> non-interactive calls).
>
I need some clarification about (<foo> is the replacement you recommend for
non-interactive calls).
Thought that (declare (interactive-only <foo>)) specifies <foo> to work only
interactively.
Thus, what is the "replacement" about?
- Re: Making a function than can only be used interactively, (continued)
- Re: Making a function than can only be used interactively, Bruno Barbier, 2022/07/03
- Message not available
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/03
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/03
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/03
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/03
- Re: Making a function than can only be used interactively,
carlmarcos <=
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/03
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/03
- Re: Making a function than can only be used interactively, Stefan Monnier, 2022/07/03
- Message not available
- Re: Making a function than can only be used interactively, carlmarcos, 2022/07/04
- Re: Making a function than can only be used interactively, Tassilo Horn, 2022/07/04
- Re: Making a function than can only be used interactively, Christopher Dimech, 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, Robert Pluim, 2022/07/04
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/04
- Re: Making a function than can only be used interactively, Jean Louis, 2022/07/05