GNU bug report logs - #2723
Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Thu, 19 Mar 2009 19:25:03 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#2723: marked as done (Emacs 23: `interactive': prefix 
 argument "P" and region "r" are mutually exclusive.)
Date: Thu, 19 Mar 2009 20:45:04 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 19 Mar 2009 16:40:11 -0400
with message-id <jwv8wn11c4c.fsf-monnier+emacsbugreports <at> gnu.org>
and subject line Re: bug#2723: Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.
has caused the Emacs bug report #2723,
regarding Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact help-debbugs <at> gnu.org
immediately.)


-- 
2723: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2723
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs 23: `interactive': prefix argument "P" and region "r" are
	mutually exclusive.
Date: Thu, 19 Mar 2009 19:15:24 +0000
Hi, Emacs!

In the following:

#########################################################################
(defun echo-prefix (arg)
  "Echo the command prefix"
  (interactive "P")
  (message "Command prefix: %s" arg))

(defun echo-region (beg end)
  "Echo the region boundaries"
  (interactive "r")
  (message "Region: (%s %s)" beg end))

(defun echo-region-prefix (beg end arg)
  "Echo the region and prefix parameters."
  (interactive "rP")
  (message "region: (%s %s); prefix: %s" beg end arg))
#########################################################################

, echo-prefix and echo-region work as expected.  echo-region-prefix
throws this error:

    Wrong number of arguments: (lambda (beg end arg) "Echo the region and
    prefix parameters." (interactive "rP") (message "region: (%s %s);
    prefix: %s" beg end arg)), 2

It seems that `(interactive "rP")' is only supplying the defun with two
parameters.

-- 
Alan Mackenzie (Nuremberg, Germany).



[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 2723-done <at> debbugs.gnu.org
Subject: Re: bug#2723: Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.
Date: Thu, 19 Mar 2009 16:40:11 -0400
> 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")


        Stefan



This bug report was last modified 16 years and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.