emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/git-commit 8811d42: magit-process-kill-on-abort: Evaluate


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 8811d42: magit-process-kill-on-abort: Evaluate kbd during macro expansion
Date: Sun, 22 Aug 2021 01:57:17 -0400 (EDT)

branch: elpa/git-commit
commit 8811d42eab06964f3169b9c15cf1cc1314b8703c
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    magit-process-kill-on-abort: Evaluate kbd during macro expansion
    
    413a98f7 (Use kbd function more when defining key bindings,
    2021-08-13) replaced a "\C-g" in the magit-process-kill-on-abort macro
    with (kbd "C-g").  This causes the magit-process:password-prompt test
    to sit waiting for input at
    
      Password for 'www.host.com':
    
    That's with Emacs 27.2 on my local machine.  The test is also failing
    in the GitHub Actions build.
    
    I don't understand why the kbd switch bothers that test, and, as far
    as I can tell, magit-process-kill-on-abort is functioning as intended
    outside of the tests.  But evaluating the kbd form during macro
    expansion fixes the test failure on my machine, so switch to that.
---
 lisp/magit-process.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index 845129e..0da5679 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -772,7 +772,9 @@ Magit status buffer."
   (let ((map (cl-gensym)))
     `(let ((,map (make-sparse-keymap)))
        (set-keymap-parent ,map minibuffer-local-map)
-       (define-key ,map (kbd "C-g")
+       ;; Note: Leaving (kbd ...) unevaluated leads to the
+       ;; magit-process:password-prompt test failing.
+       (define-key ,map ,(kbd "C-g")
          (lambda ()
            (interactive)
            (ignore-errors (kill-process ,proc))



reply via email to

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