From 89153b8bd2daaa9c1bbdce9d7ab1f0c4ee24b8e2 Mon Sep 17 00:00:00 2001 From: SK Kim Date: Mon, 3 Jan 2022 22:50:44 +0900 Subject: Make `evil-record-macro' add the same macro to the kmacro ring (#1554) * Make `evil-record-macro' add the same macro to the kmacro ring This allows kmacro to edit macros independently of the original evil macro. * Update docstring of evil-end-and-return-macro for kmacro Co-authored-by: Tom Dalziel --- evil-commands.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evil-commands.el b/evil-commands.el index d7cdc5e..f296b93 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -2288,9 +2288,9 @@ The return value is the yanked text." "The buffer that has been active on macro recording.") (defun evil-end-and-return-macro () - "Like `end-kbd-macro' but also return the macro. + "Like `kmacro-end-macro' but also return the macro. Remove \\\\[evil-execute-in-normal-state] from the end." - (end-kbd-macro) + (kmacro-end-macro nil) (let ((end-keys-seq (append evil-execute-normal-keys nil)) (last-kbd-macro-seq (append last-kbd-macro nil))) (unless last-kbd-macro-seq @@ -2332,7 +2332,7 @@ will be opened instead." (when defining-kbd-macro (end-kbd-macro)) (setq evil-this-macro register) (evil-set-register evil-this-macro nil) - (start-kbd-macro nil) + (kmacro-start-macro nil) (setq evil-macro-buffer (current-buffer))) (t (error "Invalid register"))))) -- cgit v1.0