From: Miha Rihtaršič Date: Wed, 8 Sep 2021 07:40:28 +0000 (+0200) Subject: Allow kmacros to end with C-g in minibuffer X-Git-Tag: emacs-28.0.90~1107 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d80552df71e2ffe9123689ce5c4a268098a34d88;p=emacs.git 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 (bug#48603). --- diff --git a/src/keyboard.c b/src/keyboard.c index f6139b30e7e..4b0e4a1f772 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))) + /* An `M-x' command that signals a `minibuffer-quit' condition + that's part of a kbd macro. */ + finalize_kbd_macro_chars (); specbind (Qstandard_output, Qt); specbind (Qstandard_input, Qt);