all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: npostavs@users.sourceforge.net
Cc: 25860@debbugs.gnu.org, eggert@cs.ucla.edu,
	tino.calancha@gmail.com, jwiegley@gmail.com,
	wasserwerk.studio@googlemail.com, schwab@linux-m68k.org
Subject: bug#25860: 25.1; Double macro execution
Date: Sun, 26 Feb 2017 17:33:27 +0200	[thread overview]
Message-ID: <83h93hq854.fsf@gnu.org> (raw)
In-Reply-To: <87y3wte87y.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net)

> From: npostavs@users.sourceforge.net
> Cc: Marek Twardochlib <wasserwerk.studio@googlemail.com>,  25860@debbugs.gnu.org,  eggert@cs.ucla.edu,  jwiegley@gmail.com,  Andreas Schwab <schwab@linux-m68k.org>,  eliz@gnu.org
> Date: Sun, 26 Feb 2017 02:12:33 -0500
> 
> --- i/src/keyboard.c
> +++ w/src/keyboard.c
> @@ -3029,14 +3029,6 @@ read_char (int commandflag, Lisp_Object map,
>        Vunread_post_input_method_events
>  	= nconc2 (XCDR (tem), Vunread_post_input_method_events);
>      }
> -  /* When we consume events from the various unread-*-events lists, we
> -     bypass the code that records input, so record these events now if
> -     they were not recorded already.  */
> -  if (!recorded)
> -    {
> -      record_char (c);
> -      recorded = true;
> -    }
>  
>   reread_first:
> 
> This was added in [1: 30a6b1f814].  Obviously just removing it will
> reintroduce the bug it fixed, I'm not sure what the proper fix should
> be.

Like below?

I admit that I don't see myself as an expert on all the complexity
that goes on in keyboard.c and friends.  With this change,
kmacro-tests.el still passes, but I'm not sure that's good enough
(e.g., can a macro define another macro when it runs? if so, this
change will get in the way).  Comments and test cases welcome.

Thanks.

diff --git a/src/keyboard.c b/src/keyboard.c
index 0245dfa..ec4dee0 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3245,7 +3245,7 @@ record_char (Lisp_Object c)
 	    }
 	}
     }
-  else
+  else if (NILP (Vexecuting_kbd_macro))
     store_kbd_macro_char (c);
 
   /* recent_keys should not include events from keyboard macros.  */





  reply	other threads:[~2017-02-26 15:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24  9:23 bug#25860: 25.1; Double macro execution Marek Twardochlib
2017-02-24 14:10 ` Andreas Schwab
2017-02-25  5:41   ` Tino Calancha
2017-02-25 10:10     ` Tino Calancha
2017-02-25 13:27       ` npostavs
2017-02-25 14:48         ` Tino Calancha
2017-02-25 15:26   ` Marek Twardochlib
2017-02-26  5:04     ` Tino Calancha
2017-02-26  7:12       ` npostavs
2017-02-26 15:33         ` Eli Zaretskii [this message]
2017-02-26 16:02           ` npostavs
2017-02-27 15:57             ` Eli Zaretskii
2017-02-27 17:18               ` Noam Postavsky
2017-03-03 14:21               ` Eli Zaretskii
2017-09-29 10:29                 ` Marek Twardochlib
2017-09-29 11:41                   ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h93hq854.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25860@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=jwiegley@gmail.com \
    --cc=npostavs@users.sourceforge.net \
    --cc=schwab@linux-m68k.org \
    --cc=tino.calancha@gmail.com \
    --cc=wasserwerk.studio@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.