aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-06-21 16:58:32 +0300
committerEli Zaretskii2023-06-21 16:58:32 +0300
commit0f9a1039befea72e0f0a6987f8a65cb299a5dc73 (patch)
tree5c9f7ce899674a4bfe19b20c25d5c7657a4ca0e2
parenta5c71cc2322bfcc9e611213a14ef4a83a7c61007 (diff)
downloademacs-0f9a1039befea72e0f0a6987f8a65cb299a5dc73.tar.gz
emacs-0f9a1039befea72e0f0a6987f8a65cb299a5dc73.zip
Extend handling of prefix arg in some kmacro.el commands
* lisp/kmacro.el (kmacro-call-ring-2nd) (kmacro-call-ring-2nd-repeat, kmacro-end-macro) (kmacro-end-and-call-macro): Accept just "C-u" and interpret it as a numeric argument of 4. Suggested by Al Petrofsky <al@petrofsky.org>. (Bug#64138)
-rw-r--r--lisp/kmacro.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 64aa7a27bde..7489076ea2e 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -504,8 +504,9 @@ ARG is the number of times to execute the item.")
504 504
505 505
506(defun kmacro-call-ring-2nd (arg) 506(defun kmacro-call-ring-2nd (arg)
507 "Execute second keyboard macro in macro ring." 507 "Execute second keyboard macro in macro ring.
508 (interactive "P") 508With numeric argument ARG, execute the macro that many times."
509 (interactive "p")
509 (unless (kmacro-ring-empty-p) 510 (unless (kmacro-ring-empty-p)
510 (funcall (car kmacro-ring) arg))) 511 (funcall (car kmacro-ring) arg)))
511 512
@@ -514,7 +515,7 @@ ARG is the number of times to execute the item.")
514 "Execute second keyboard macro in macro ring. 515 "Execute second keyboard macro in macro ring.
515This is like `kmacro-call-ring-2nd', but allows repeating macro commands 516This is like `kmacro-call-ring-2nd', but allows repeating macro commands
516without repeating the prefix." 517without repeating the prefix."
517 (interactive "P") 518 (interactive "p")
518 (let ((keys (kmacro-get-repeat-prefix))) 519 (let ((keys (kmacro-get-repeat-prefix)))
519 (kmacro-call-ring-2nd arg) 520 (kmacro-call-ring-2nd arg)
520 (if (and kmacro-ring keys) 521 (if (and kmacro-ring keys)
@@ -650,10 +651,10 @@ The macro is now available for use via \\[kmacro-call-macro],
650or it can be given a name with \\[kmacro-name-last-macro] and then invoked 651or it can be given a name with \\[kmacro-name-last-macro] and then invoked
651under that name. 652under that name.
652 653
653With numeric arg, repeat macro now that many times, 654With numeric ARG, repeat the macro that many times,
654counting the definition just completed as the first repetition. 655counting the definition just completed as the first repetition.
655An argument of zero means repeat until error." 656An argument of zero means repeat until error."
656 (interactive "P") 657 (interactive "p")
657 ;; Isearch may push the kmacro-end-macro key sequence onto the macro. 658 ;; Isearch may push the kmacro-end-macro key sequence onto the macro.
658 ;; Just ignore it when executing the macro. 659 ;; Just ignore it when executing the macro.
659 (unless executing-kbd-macro 660 (unless executing-kbd-macro
@@ -787,7 +788,7 @@ Zero argument means repeat until there is an error.
787 788
788To give a macro a name, so you can call it even after defining other 789To give a macro a name, so you can call it even after defining other
789macros, use \\[kmacro-name-last-macro]." 790macros, use \\[kmacro-name-last-macro]."
790 (interactive "P") 791 (interactive "p")
791 (if defining-kbd-macro 792 (if defining-kbd-macro
792 (kmacro-end-macro nil)) 793 (kmacro-end-macro nil))
793 (kmacro-call-macro arg no-repeat)) 794 (kmacro-call-macro arg no-repeat))