[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 4efdc7066f 3/6: magit-process-yes-or-no-prompt:
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 4efdc7066f 3/6: magit-process-yes-or-no-prompt: Cosmetics |
Date: |
Sat, 22 Jul 2023 22:01:16 -0400 (EDT) |
branch: elpa/git-commit
commit 4efdc7066f3d6ecde2c1f93e09823112c878e29f
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-process-yes-or-no-prompt: Cosmetics
A bit of duplication seems preferable to the deep nesting we had
before.
---
lisp/magit-process.el | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index 278fb85509..64295e3bd8 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -802,17 +802,14 @@ Magit status buffer."
(defun magit-process-yes-or-no-prompt (process string)
"Forward Yes-or-No prompts to the user."
(when-let ((beg (string-match magit-process-yes-or-no-prompt-regexp string)))
- (let ((max-mini-window-height 30))
- (process-send-string
- process
- (downcase
- (concat
- (match-string
- (if (save-match-data
- (magit-process-kill-on-abort process
- (yes-or-no-p (substring string 0 beg)))) 1 2)
- string)
- "\n"))))))
+ (process-send-string
+ process
+ (if (save-match-data
+ (let ((max-mini-window-height 30))
+ (magit-process-kill-on-abort process
+ (yes-or-no-p (substring string 0 beg)))))
+ (concat (downcase (match-string 1 string)) "\n")
+ (concat (downcase (match-string 2 string)) "\n")))))
(defun magit-process-password-auth-source (key)
"Use `auth-source-search' to get a password.
- [nongnu] elpa/git-commit updated (2126eab6a9 -> eba1e855f3), ELPA Syncer, 2023/07/22
- [nongnu] elpa/git-commit 38138c14e8 1/6: Don't try to load magit-libgit when magit-inhibit-libgit is set, ELPA Syncer, 2023/07/22
- [nongnu] elpa/git-commit 1127aa8b3d 2/6: magit-process-username-prompt: Cosmetics, ELPA Syncer, 2023/07/22
- [nongnu] elpa/git-commit 4efdc7066f 3/6: magit-process-yes-or-no-prompt: Cosmetics,
ELPA Syncer <=
- [nongnu] elpa/git-commit f620d6899f 5/6: Use abort-recursive-edit if abort-minibuffers is not available yet, ELPA Syncer, 2023/07/22
- [nongnu] elpa/git-commit eba1e855f3 6/6: Silence byte-compiler on Emacs 26.3 and older, ELPA Syncer, 2023/07/22
- [nongnu] elpa/git-commit 8b3acf7473 4/6: Fix killing process if user input is aborted, ELPA Syncer, 2023/07/22