summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMarco Wahl <marcowahlsoft@gmail.com>2021-01-29 08:01:12 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-01-29 08:01:12 +0100
commitd4e9d191aeba9076db06857a90649f6fcddc7f3b (patch)
tree6a95d2ac53d149920ce4e2a900d42829074d3a29 /lisp
parent1275dc4711af77c9c223063dcd149d782d497463 (diff)
downloademacs-d4e9d191aeba9076db06857a90649f6fcddc7f3b.tar.gz
emacs-d4e9d191aeba9076db06857a90649f6fcddc7f3b.tar.bz2
emacs-d4e9d191aeba9076db06857a90649f6fcddc7f3b.zip
Add a command for redisplay during keyboard macros
* doc/emacs/kmacro.texi (Basic Keyboard Macro): Document it (bug#39252). * lisp/kmacro.el (kdb-macro-redisplay): New function. (kmacro-keymap): Bind it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/kmacro.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index bb8dacf4f48..303f38a59b6 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -172,6 +172,7 @@ macro to be executed before appending to it."
(define-key map "\C-k" 'kmacro-end-or-call-macro-repeat)
(define-key map "r" 'apply-macro-to-region-lines)
(define-key map "q" 'kbd-macro-query) ;; Like C-x q
+ (define-key map "Q" 'kdb-macro-redisplay)
;; macro ring
(define-key map "\C-n" 'kmacro-cycle-ring-next)
@@ -1298,6 +1299,16 @@ To customize possible responses, change the \"bindings\" in
(kmacro-push-ring)
(setq last-kbd-macro kmacro-step-edit-new-macro))))
+(defun kdb-macro-redisplay ()
+ "Force redisplay during kbd macro execution."
+ (interactive)
+ (or executing-kbd-macro
+ defining-kbd-macro
+ (user-error "Not defining or executing kbd macro"))
+ (when executing-kbd-macro
+ (let ((executing-kbd-macro nil))
+ (redisplay))))
+
(provide 'kmacro)
;;; kmacro.el ends here