]> git.eshelyaron.com Git - emacs.git/commitdiff
universal-argument--preserve: Preserve last-prefix-arg
authorSean Whitton <spwhitton@spwhitton.name>
Thu, 30 May 2024 11:45:57 +0000 (12:45 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 May 2024 18:14:34 +0000 (20:14 +0200)
* lisp/simple.el (universal-argument--preserve): Set
current-prefix-arg to last-prefix-arg in order to preserve
last-prefix-arg, too (bug#71277).

(cherry picked from commit 0b4d2bb9b366ea78e8bc6bf1915d91d4131e98f7)

lisp/simple.el

index 764f809c01212ef890acbf0e979ec2524cbc54f2..071ec7df9fbb0a986bb8fa62021026f7a9e04fca 100644 (file)
@@ -5464,7 +5464,8 @@ Runs `prefix-command-preserve-state-hook'."
 (add-hook 'prefix-command-preserve-state-hook
           #'universal-argument--preserve)
 (defun universal-argument--preserve ()
-  (setq prefix-arg current-prefix-arg))
+  (setq prefix-arg current-prefix-arg)
+  (setq current-prefix-arg last-prefix-arg))
 
 (defvar universal-argument-map
   (let ((map (make-sparse-keymap))