branch: elpa/git-commit
commit 44ac452a9f56c9616e66fd650537342abd094075
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-read-char-case: Always separate one choice with a "or"
---
lisp/magit-base.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index bcbc3e7c19..607c78eb1e 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -751,11 +751,11 @@ This is similar to `read-string', but
(declare (indent 2)
(debug (form form &rest (characterp form body))))
`(prog1 (pcase (read-char-choice
- (concat ,prompt
- (mapconcat #'identity
- (list ,@(mapcar #'cadr clauses))
- ", ")
- ,(if verbose ", or [C-g] to abort " " "))
+ (let ((parts (nconc (list ,@(mapcar #'cadr clauses))
+ ,(and verbose '(list "[C-g] to
abort")))))
+ (concat ,prompt
+ (mapconcat #'identity (butlast parts) ", ")
+ ", or " (car (last parts)) " "))
',(mapcar #'car clauses))
,@(--map `(,(car it) ,@(cddr it)) clauses))
(message "")))