[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 463a355: git-commit-search-message-{backward, f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 463a355: git-commit-search-message-{backward, forward}: Don't use format-prompt |
Date: |
Sat, 4 Dec 2021 16:57:46 -0500 (EST) |
branch: elpa/git-commit
commit 463a3550e27ab1cb0dc53afb0199f2e50660f24c
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>
git-commit-search-message-{backward,forward}: Don't use format-prompt
format-prompt isn't available until (what will be) Emacs 28.1. Use a
plain format call instead.
The new behavior is different in that 1) it doesn't respect
minibuffer-default-prompt-format and 2) it shows "(default )" for an
empty string default rather than hiding the default entirely. The
first seems an acceptable trade for compatibility while avoiding a
wrapper/kludge. And the second seems fine in general given that the
empty string is in fact the default, so it's worth telling the user
about the useless default value.
---
lisp/git-commit.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index f098496..420d0bf 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -730,8 +730,9 @@ With a numeric prefix ARG, go forward ARG comments."
"Search backward through message history for a match for STRING.
Save current message first."
(interactive
- (list (read-string (format-prompt "Comment substring"
- log-edit-last-comment-match)
+ ;; Avoid `format-prompt' because it isn't available until Emacs 28.
+ (list (read-string (format "Comment substring (default %s): "
+ log-edit-last-comment-match)
nil nil log-edit-last-comment-match)))
(cl-letf (((symbol-function #'log-edit-previous-comment)
(symbol-function #'git-commit-prev-message)))
@@ -741,8 +742,9 @@ Save current message first."
"Search forward through message history for a match for STRING.
Save current message first."
(interactive
- (list (read-string (format-prompt "Comment substring"
- log-edit-last-comment-match)
+ ;; Avoid `format-prompt' because it isn't available until Emacs 28.
+ (list (read-string (format "Comment substring (default %s): "
+ log-edit-last-comment-match)
nil nil log-edit-last-comment-match)))
(cl-letf (((symbol-function #'log-edit-previous-comment)
(symbol-function #'git-commit-prev-message)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit 463a355: git-commit-search-message-{backward, forward}: Don't use format-prompt,
ELPA Syncer <=