[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interactive codes "p" and "P" - bug or mistake
From: |
Andreas Röhler |
Subject: |
Re: interactive codes "p" and "P" - bug or mistake |
Date: |
Tue, 26 Jul 2011 19:00:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 |
Am 26.07.2011 18:42, schrieb Teemu Likonen:
* 2011-07-26T18:19:53+02:00 * Andreas Röhler wrote:
given that function:
(defun foo-bar (foo&optional bar)
""
(interactive "p\nP*")
(message "foo %s bar %s" foo bar))
I'm not sure what you think is wrong or unexpected there. I suggest
reading info pages
(info "(elisp) Prefix Command Arguments")
(info "(elisp) Interactive codes")
Note the difference between "raw" and "numeric" prefix argument.
Thanks Drews and Teemu,
think I know the docu, maybe I didn't understood it correctly.
IMO the code "p" sends the numerical argument, while "P" the Prefix
value introduced with C-u
So if I do M-NUMBER, "P" should send nothing.
whilst C-u M-command
both should send their defaults, ie "p" 1 and "P" (4)
?
Cheers,
Andreas