GNU bug report logs -
#64138
28.2; C-x ) won't accept the universal argument
Previous Next
Reported by: Al Petrofsky <al <at> petrofsky.org>
Date: Sat, 17 Jun 2023 23:49:02 UTC
Severity: normal
Found in version 28.2
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 21 Jun 2023 17:02:06 +0300
with message-id <83sfak52xt.fsf <at> gnu.org>
and subject line Re: bug#64138: 28.2; C-x ) won't accept the universal argument
has caused the debbugs.gnu.org bug report #64138,
regarding 28.2; C-x ) won't accept the universal argument
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
64138: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64138
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
emacs-28.2 -Q -nw
C-x ( x C-u C-x )
The C-u C-x ) should complete the macro definition and then execute
the macro three times, making the buffer contents "xxxx". Instead,
the error "Wrong type argument: fixnump, (4)" occurs.
(Changing "C-u" to "C-u 4" gives the expected result.)
The "P" in the interactive declaration of kmacro-end-macro should be a
"p".
Looking at all eleven "P" in kmacro.el, I think four of them should be
"p": kmacro-call-ring-2nd, kmacro-call-ring-2nd-repeat,
kmacro-end-macro, and kmacro-end-and-call-macro.
Alternatively, if the meaning of a bare C-u argument is being reserved
for some future feature, then it should be explicitly mentioned in the
documentation that C-u and C-u 4 are treated differently. As the
manual says:
A few commands treat a plain ‘C-u’ differently from an ordinary
argument. A few others may treat an argument of just a minus sign
differently from an argument of −1. These unusual cases are described
when they come up; they exist to make an individual command more
convenient, and they are documented in that command’s documentation
string.
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Al Petrofsky <al <at> petrofsky.org>, 64138 <at> debbugs.gnu.org
> Date: Sun, 18 Jun 2023 10:08:04 -0400
>
> >> I have no objections to extending those commands to accept just C-u,
> >> though. Stefan, any reasons why not?
> > Offhand, I can't think of any reason why not.
>
> BTW: the main question here is whether a C-1 prefix should be treated
> the same as the absence of a prefix. AFAICT, the `arg` argument
> of `kmacro-end-macro` is only used once, to pass it to `end-kbd-macro`,
> and that function starts with:
>
> if (NILP (repeat))
> XSETFASTINT (repeat, 1);
> else
> CHECK_FIXNUM (repeat);
>
> so, the absence of a prefix arg currently should indeed always behave
> exactly as with a `C-1` arg.
> IOW, I'm pretty sure now that there is not reason why not.
OK, thanks. I've now installed this on the master branch, and I'm
closing this bug.
This bug report was last modified 1 year and 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.