GNU bug report logs - #39353
[PATCH] Use current-prefix-arg instead of prefix-arg

Previous Next

Package: emacs;

Reported by: Kyle Hubert <khubert <at> gmail.com>

Date: Thu, 30 Jan 2020 09:00:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#39353: closed ([PATCH] Use current-prefix-arg instead of
 prefix-arg)
Date: Sat, 08 Feb 2020 10:03:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 08 Feb 2020 12:01:59 +0200
with message-id <83blq9e6so.fsf <at> gnu.org>
and subject line Re: bug#39353: [PATCH] Ediff fix for ediff-scroll-horizontally
has caused the debbugs.gnu.org bug report #39353,
regarding [PATCH] Use current-prefix-arg instead of prefix-arg
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
39353: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39353
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Kyle Hubert <khubert <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Kyle Hubert <khubert <at> gmail.com>
Subject: [PATCH] Use current-prefix-arg instead of prefix-arg
Date: Wed, 29 Jan 2020 22:35:04 -0500
Forwarding arguments through to children function invocations should
be handled by current-prefix-arg. This was first uncovered when ediff
used full window width scrolling in ediff-scroll-horizontally, when
the call to scroll-left or scroll-right should have been half-window
size. Through further grepping, there was another usage in
simple.el. Note, execute-extended-command was visually inspected that
it was in interactive mode.

---
 lisp/simple.el        | 2 +-
 lisp/vc/ediff-util.el | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 2ec3da680f..53afa7b138 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1888,7 +1888,7 @@ invoking, give a prefix argument to `execute-extended-command'."
     ;; `function' and not `execute-extended-command'.  The difference is
     ;; visible in cases such as M-x <cmd> RET and then C-x z (bug#11506).
     (setq real-this-command function)
-    (let ((prefix-arg prefixarg))
+    (let ((current-prefix-arg prefixarg))
       (command-execute function 'record))
     ;; If enabled, show which key runs this command.
     ;; But first wait, and skip the message if there is input.
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index a8af9ba37a..5f8a4a86b1 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -1540,10 +1540,10 @@ the width of the A/B/C windows."
    ;; hscrolling.
    (if (= last-command-event ?<)
        (lambda (arg)
-	 (let ((prefix-arg arg))
+	 (let ((current-prefix-arg arg))
 	   (call-interactively #'scroll-left)))
      (lambda (arg)
-       (let ((prefix-arg arg))
+       (let ((current-prefix-arg arg))
 	 (call-interactively #'scroll-right))))
    ;; calculate argument to scroll-left/right
    ;; if there is an explicit argument
-- 
2.25.0



[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Kyle Hubert <khubert <at> gmail.com>
Cc: 39353-done <at> debbugs.gnu.org
Subject: Re: bug#39353: [PATCH] Ediff fix for ediff-scroll-horizontally
Date: Sat, 08 Feb 2020 12:01:59 +0200
> From: Kyle Hubert <khubert <at> gmail.com>
> Date: Fri, 31 Jan 2020 09:29:43 -0500
> Cc: Kyle Hubert <khubert <at> gmail.com>
> 
> When ediff-scroll-horizontally interactively calls scroll-left and
> scroll-right, current-prefix-arg should be used. This allows for the
> case that when no args or '-' are passed to ediff-scroll-horizontally,
> it will determine the default amount (half the window width or
> half-again, respectively).
> ---
>  lisp/vc/ediff-util.el | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, pushed to the master branch.


This bug report was last modified 5 years and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.