[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28008: 25.2; Resume kmacro definition errors C-u C-u <F3>
From: |
Allen Li |
Subject: |
bug#28008: 25.2; Resume kmacro definition errors C-u C-u <F3> |
Date: |
Fri, 29 Sep 2017 20:47:54 -0700 |
On Tue, Sep 19, 2017 at 12:42 AM, Allen Li <vianchielfaura@gmail.com> wrote:
> Actually, to fix case D.2 (where undefined keys exit kmacro definition
> without saving), all that is needed is a short Emacs Lisp change.
> This keeps the behavior of a bare C-g keyboard-abort of not saving the
> kmacro.
>
> [PATCH] Make undefined keys exit and save kmacro definition
>
> * lisp/subr.el (undefined): Error out of kmacro definition.
> ---
> lisp/subr.el | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/subr.el b/lisp/subr.el
> index 79ae1f4830..f0c4e2969d 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -785,8 +785,9 @@ undefined
> "Beep to tell the user this binding is undefined."
> (interactive)
> (ding)
> - (message "%s is undefined" (key-description (this-single-command-keys)))
> - (setq defining-kbd-macro nil)
> + (if defining-kbd-macro
> + (error "%s is undefined" (key-description (this-single-command-keys)))
> + (message "%s is undefined" (key-description (this-single-command-keys))))
> (force-mode-line-update)
> ;; If this is a down-mouse event, don't reset prefix-arg;
> ;; pass it to the command run by the up event.
> --
> 2.14.1
Any updates on this? I have been running this patch locally (monkey
patched) for a week without any issues.