diff options
| author | Vasilij Schneidermann <mail@vasilij.de> | 2017-10-04 17:46:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-04 17:46:46 +0200 |
| commit | ca6e155878c4a398fa4c297ea8b6a329cfc40ca9 (patch) | |
| tree | 4f274d521e82492df277644476ec2d4096890426 /evil-commands.el | |
| parent | 5a9fd7233891da2508bde343e1cd7468b75c3800 (diff) | |
| parent | bd896a25a82d1c6362851cb5d08990492ada6ffa (diff) | |
Merge pull request #927 from edkolev/dont-abort-macro-on-buffer-change
Don't abort macro recording when current buffer is changed
Diffstat (limited to 'evil-commands.el')
| -rw-r--r-- | evil-commands.el | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/evil-commands.el b/evil-commands.el index 123b3d2..e7b72cf 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -2021,15 +2021,6 @@ The return value is the yanked text." (defvar evil-macro-buffer nil "The buffer that has been active on macro recording.") -(defun evil-abort-macro () - "Abort macro recording when the buffer is changed. -Macros are aborted when the the current buffer -is changed during macro recording." - (unless (or (minibufferp) (eq (current-buffer) evil-macro-buffer)) - (remove-hook 'post-command-hook #'evil-abort-macro) - (end-kbd-macro) - (message "Abort macro recording (changed buffer)"))) - (evil-define-command evil-record-macro (register) "Record a keyboard macro into REGISTER. If REGISTER is :, /, or ?, the corresponding command line window @@ -2043,7 +2034,6 @@ will be opened instead." ((eq register ?\C-g) (keyboard-quit)) ((and evil-this-macro defining-kbd-macro) - (remove-hook 'post-command-hook #'evil-abort-macro) (setq evil-macro-buffer nil) (condition-case nil (end-kbd-macro) @@ -2066,8 +2056,7 @@ will be opened instead." (setq evil-this-macro register) (evil-set-register evil-this-macro nil) (start-kbd-macro nil) - (setq evil-macro-buffer (current-buffer)) - (add-hook 'post-command-hook #'evil-abort-macro)) + (setq evil-macro-buffer (current-buffer))) (t (error "Invalid register")))) (evil-define-command evil-execute-macro (count macro) |
