[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: Making a function than can only be used interactive
From: |
Drew Adams |
Subject: |
RE: [External] : Re: Making a function than can only be used interactively |
Date: |
Sat, 9 Jul 2022 14:53:38 +0000 |
> I also found no way to get the equivalent of
> Code Character "P" if the function includes
> an arg that stores the prefix within a list
"P" stands for `current-prefix-arg'. Just put
that in the list.
> (defun guling (&optional prefix a b) "Docstring"
> (interactive
> (cond
> ((equal current-prefix-arg 2)
> (list
> () ; What should one put here???
current-prefix-arg
(or even just 2 in this case, since you know it's 2)
> (read-from-minibuffer "a: ")
> (read-from-minibuffer "b: ")))))
> (processing))
If you want to pass the value of the raw prefix
arg as one of the arguments to your command (in
this case the arg PREFIX), then just put its
value in the list arg of `interactive' (in this
case as the first list element).
You really owe it to yourself, if you're starting
to write some Elisp code, to dig into the fine
manual Emacs that gives you (with `C-h i'):
"An Introduction to Programming in Emacs Lisp"
https://www.gnu.org/software/emacs/manual/html_node/eintr/
- 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/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
- Re: Making a function than can only be used interactively, Christopher Dimech, 2022/07/08
- RE: [External] : Re: Making a function than can only be used interactively, Drew Adams, 2022/07/08
- RE: [External] : Re: Making a function than can only be used interactively, carlmarcos, 2022/07/08
- RE: [External] : Re: Making a function than can only be used interactively, Drew Adams, 2022/07/08
- RE: [External] : Re: Making a function than can only be used interactively, carlmarcos, 2022/07/08
- RE: [External] : Re: Making a function than can only be used interactively,
Drew Adams <=
- Re: [External] : Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/08
- Re: [External] : Re: Making a function than can only be used interactively, Emanuel Berg, 2022/07/08
- RE: [External] : Re: Making a function than can only be used interactively, Drew Adams, 2022/07/04
- no difference between interactive and "from Lisp" (was: Re: Making a function than can only be used interactively), Emanuel Berg, 2022/07/05
- Re: no difference between interactive and "from Lisp", Stefan Monnier, 2022/07/05
- Re: no difference between interactive and "from Lisp", Emanuel Berg, 2022/07/05
- Re: Making a function than can only be used interactively, Po Lu, 2022/07/03
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, Christopher Dimech, 2022/07/04