[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: |
Mon, 4 Jul 2022 00:45:46 +0200 (CEST) |
Jul 3, 2022, 22:01 by help-gnu-emacs@gnu.org:
>> Thought that (declare (interactive-only <foo>)) specifies <foo> to
>> work only interactively. Thus, what is the "replacement" about?
>>
>
> No, the function that's declared to be `interactive-only` is the
> function in which you place this `declare`. The <foo> is used in the
> warning's text to say something like "<blabla> is for interactive only;
> use <foo> instead".
>
> A `grep '(interactive-only' **/*.el` in Emacs's source code will give
> you some examples.
>
I have seen
(declare (interactive-only t))
(interactive-only "use `font-lock-ensure' or `font-lock-flush' instead."))
(declare (interactive-only delete-char))
I am still unsure because I have done
(declare (interactive-only arktika-automated-workbench))
before `(interactive "P")` in a function `arktika-workbench`.
`arktika-automated-workbench` is the non-interactive function whilst
`arktika-workbench` is an interactive wrapper.
Yet when I do `(arktika-workbench)` in my init file, the interactive function
`arktika-workbench` still gets executed.
>
> Stefan
>
- Re: Making a function than can only be used interactively, (continued)
- Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/05
- 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, 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
- 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
- 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