[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Accessing arg with (interactive "P")

From: Drew Adams
Subject: RE: [External] : Accessing arg with (interactive "P")
Date: Wed, 6 Jul 2022 00:55:14 +0000

> I have the following elisp function, using `current-prefix-arg` to
> decide subsequent processing.
> Having made the command examine it directly, the usual method for
> accessing it is with
> (interactive "P").  The problem is that I do not know how to examine
> the prefix arg through
>  the interactive clause.
> (defun poke (&optional prefix)
>   "TODO"
>   (interactive "P")
>   (cond
>    ((equal current-prefix-arg nil)   ; no C-u
>     (setq workbench-poke-name-mode 1))
>    ((equal current-prefix-arg '(4))  ; C-u
>     (arktika-workbench))

Not sure what your question is or what it is that
you want to do.  But change `current-prefix-arg'
to `prefix' and your code will do what I'm guessing
you want it to do.

<<attachment: winmail.dat>>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]