GNU bug report logs - #24992
25.1; Using mouse, can put empty keyboard macro in macro ring

Previous Next

Package: emacs;

Reported by: Gemini Lasswell <gazally <at> runbox.com>

Date: Tue, 22 Nov 2016 22:33:01 UTC

Severity: minor

Tags: fixed, patch

Found in version 25.1

Fixed in version 26.1

Done: Gemini Lasswell <gazally <at> runbox.com>

Bug is archived. No further changes may be made.

Full log


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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: 24992 <at> debbugs.gnu.org
Subject: Re: bug#24992: 25.1;
 Using mouse, can put empty keyboard macro in macro ring
Date: Thu, 07 Dec 2017 22:01:28 -0500
severity 24992 minor
tags 24992 + patch
quit

Gemini Lasswell <gazally <at> runbox.com> writes:

> The commentary in lisp/kmacro.el says "Note: an empty macro is never
> added to the macro ring.", but here is a way to add an empty macro to
> the ring using kmacro-end-call-mouse, which is by default bound to
> S-mouse-3. I am not aware of any serious side effects of there being an
> empty macro in the ring.
>
> To reproduce, with emacs -Q and the mouse pointer positioned over your
> Emacs window:
>
> C-x ( aaa S-mouse-3
> C-x ( S-mouse-3
> C-x ( bbb S-mouse-3
> C-x C-k C-n C-n C-n
>
> This defines three macros, one which inserts "aaa", an empty one, and one
> which inserts "bbb". Then the repeated C-n's of the last step cycle
> through the macros in the ring and display them in the echo area.
>
> I'm attaching a patch which makes kmacro-end-call-mouse do the same
> thing that kmacro-end-and-call-macro does in this case, which is to end
> the definition of the empty macro, pop the empty macro off the ring, and
> then run the macro which becomes current.

I guess this could be applied now?




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

Previous Next


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