emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 315d550 2/3: Allow 'undo-redo' to be called from Lisp without rep


From: Lars Ingebrigtsen
Subject: master 315d550 2/3: Allow 'undo-redo' to be called from Lisp without repeat count
Date: Tue, 9 Nov 2021 19:17:32 -0500 (EST)

branch: master
commit 315d550bf7ff9444bec98e8b44c4fd2bf12b492c
Author: Tom Levy <tomlevy93@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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
---
 lisp/simple.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 82e373b..ad6d28c 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]