GNU bug report logs - #31243
26.1; kmacro-insert-counter increments incorrectly

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Mon, 23 Apr 2018 02:34:01 UTC

Severity: minor

Found in version 26.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 31243 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Allen Li <darkfeline <at> felesatra.moe>
Cc: 31243 <at> debbugs.gnu.org,
 bug-gnu-emacs <bug-gnu-emacs-bounces+psainty=orcon.net.nz <at> gnu.org>
Subject: Re: bug#31243: 26.1; kmacro-insert-counter increments incorrectly
Date: Mon, 23 Apr 2018 16:56:46 +1200
Not a bug?  I believe your expectations are incorrect.

> C-u <f3> ;; kmacro-start-macro-or-insert-counter

This insert the *previous* macro counter.  Which is sort of "undefined" 
for the first iteration, but zero in practice.

=> 0

> <f3> ;; kmacro-start-macro-or-insert-counter

Insert the current macro counter (which is also zero, because inserting 
the previous counter does not touch the current counter).

=> 0

Then the counter is incremented -- so the current counter is set to 1, 
and the previous counter is set to 0.

Hence when you trigger the next iteration, you insert 0 and 1; etc...






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

Previous Next


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