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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24992: 25.1; Using mouse, can put empty keyboard macro in macro ring


From: Noam Postavsky
Subject: bug#24992: 25.1; Using mouse, can put empty keyboard macro in macro ring
Date: Thu, 07 Dec 2017 22:01:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

severity 24992 minor
tags 24992 + patch
quit

Gemini Lasswell <address@hidden> 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?





reply via email to

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