GNU bug report logs -
#2723
Emacs 23: `interactive': prefix argument "P" and region "r" are mutually exclusive.
Previous Next
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
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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.