From ba7c81e893f4a196a1971dc3d41345c3fd343a97 Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Tue, 9 Nov 2021 12:05:28 +0000 Subject: [PATCH 1/3] Allow 'undo-redo' to be called from Lisp without repeat count * lisp/simple.el (undo-redo): Default arg to 1 to avoid error when called from Lisp without args. Copyright-paperwork-exempt: yes --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 82e373be9e..ad6d28cb14 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3114,7 +3114,7 @@ undo-redo (let ((undo-in-progress t)) (while (and (consp ul) (eq (car ul) nil)) (setq ul (cdr ul))) - (primitive-undo arg ul))) + (primitive-undo (or arg 1) ul))) (new-pul (undo--last-change-was-undo-p new-ul))) (message "Redo%s" (if undo-in-region " in region" "")) (setq this-command 'undo) -- 2.30.2