From 1fc801cde2cd0a7c557fdb3d4e1593eaa85518f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Rihtar=C5=A1i=C4=8D?= 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