diff options
author | Tom Levy <tomlevy93@gmail.com> | 2021-11-09 12:05:28 +0000 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-10 01:12:47 +0100 |
commit | 315d550bf7ff9444bec98e8b44c4fd2bf12b492c (patch) | |
tree | 8ba5e3d81fc103c7684338662a853960bff08954 | |
parent | 912ae5de928a5042a8ac77b80d743a6d8f7ed1e8 (diff) | |
download | emacs-315d550bf7ff9444bec98e8b44c4fd2bf12b492c.tar.gz emacs-315d550bf7ff9444bec98e8b44c4fd2bf12b492c.tar.bz2 emacs-315d550bf7ff9444bec98e8b44c4fd2bf12b492c.zip |
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 (bug#51718).
Copyright-paperwork-exempt: yes
-rw-r--r-- | lisp/simple.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 82e373be9e6..ad6d28cb14d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3114,7 +3114,7 @@ Interactively, ARG is the prefix numeric argument and defaults to 1." (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) |