[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#2723: Emacs 23: `interactive': prefix argument "P" and region "r" ar
From: |
Alan Mackenzie |
Subject: |
bug#2723: Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive. |
Date: |
Thu, 19 Mar 2009 21:49:04 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Stefan!
On Thu, Mar 19, 2009 at 04:40:11PM -0400, Stefan Monnier wrote:
> > It seems that `(interactive "rP")' is only supplying the defun with two
> > parameters.
> Read C-h f interactive RET, and if you read carefully enough you'll see
> you need (interactive "r\nP")
No. I've read closely and it doesn't say this, neither in the doc
string or the Elisp manual. The pertinent bit of the Elisp manual reads
thusly:
* It may be a string; then its contents should consist of a code
character followed by a prompt (which some code characters use and
some ignore). The prompt ends either with the end of the string
or with a newline. Here is a simple example:
, i.e. the \n terminates the prompt rather than separating it from the
next thing. This bit of the manual is oblivious to the existence of
descriptors lacking prompts ("p", "P", "r", "d", "i", "m"), and looks
like it could have been written early in Emacs's development, before "p"
and friends existed (if there was such a time).
The only bit of the doc string which is relevant is
To prompt for multiple arguments, give a code letter, its prompt, a
newline, and another code letter, etc.
, which implies that the \n is required only where there's prompting
going on, which clearly isn't the case for "P", "r", etc.
Is there any reason why there needs to be a \n separating "P" and "r"?
After all, in a shell, we can write
tar -xf emacs.tar.gz
, rather than having to do
tar -x -f emacs.tar.gz
, which is somewhat analagous. Aternatively, why does the interactive
call function not give an error message?
OK, I'll write the patches for the Elisp manual and `interactive''s doc
string. Just not tonight. Should I reopen this bug, submit a new bug,
or just submit the patch?
> Stefan
>
--
Alan Mackenzie (Nuremberg, Germany).
Message not available