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: Alan Mackenzie <acm <at> muc.de>
Subject: bug#2723 closed by Stefan Monnier <monnier <at> iro.umontreal.ca> (Re:
 bug#2723: 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)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#2723: Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.

It has been closed by Stefan Monnier <monnier <at> iro.umontreal.ca>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Stefan Monnier <monnier <at> iro.umontreal.ca> by
replying to this email.


-- 
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: 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


[Message part 3 (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).




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.