bug-gnu-emacs
[Top][All Lists]
Advanced

[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 19:15:24 +0000
User-agent: Mutt/1.5.9i

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).







reply via email to

[Prev in Thread] Current Thread [Next in Thread]