GNU bug report logs -
#48603
27.2; [PATCH] Quit minibuffers without aborting kmacros
Previous Next
Reported by: miha <at> kamnitnik.top
Date: Sun, 23 May 2021 14:32:02 UTC
Severity: normal
Tags: patch
Found in version 27.2
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> <miha <at> kamnitnik.top> writes:
>
>> Good idea, attaching a revised patch (which also adds two NEWS entries.)
>
> Sorry; I forgot all about this. I've now re-read and tested the patch,
> and it seems to work fine for me, so I've pushed it to Emacs 28.
After some testing, I found out that we can't record kmacros that end
with C-g in the minibuffer. For example, trying to record a kmacro like
"C-n M-x C-g" will actually record only "C-n".
Please consider the attached patch to fix this.
[0001-Allow-kmacros-to-end-with-C-g-in-minibuffer.patch (text/x-patch, inline)]
From 1fc801cde2cd0a7c557fdb3d4e1593eaa85518f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miha=20Rihtar=C5=A1i=C4=8D?= <miha <at> kamnitnik.top>
Date: Tue, 7 Sep 2021 16:55:22 +0200
Subject: [PATCH] Allow kmacros to end with C-g in minibuffer
* src/keyboard.c (cmd_error): If a command causes a minibuffer-quit
condition, record its key in a keyboard macro.
---
src/keyboard.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/keyboard.c b/src/keyboard.c
index f6139b30e7..a32c3e7b2b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -951,6 +951,10 @@ cmd_error (Lisp_Object data)
Vexecuting_kbd_macro = Qnil;
executing_kbd_macro = Qnil;
}
+ else if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
+ /* A command that signals a minibuffer-quit condition should be
+ installed in kbd macro. */
+ finalize_kbd_macro_chars ();
specbind (Qstandard_output, Qt);
specbind (Qstandard_input, Qt);
--
2.33.0
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years 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.