[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 a089d6a: Don't fiddle with DEFAULT
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] emacs-25 a089d6a: Don't fiddle with DEFAULT |
Date: |
Sat, 30 Jan 2016 08:58:35 +0000 |
branch: emacs-25
commit a089d6a211c9051e27a78d03d5b323300134bb21
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Don't fiddle with DEFAULT
* lisp/progmodes/project.el (project--completing-read-strict):
Don't change DEFAULT, whether is has any matches in
COLLECTION, or not.
---
lisp/progmodes/project.el | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 0b05de2..1251bca 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -374,9 +374,10 @@ recognized."
(defun project--completing-read-strict (prompt
collection &optional predicate
hist default inherit-input-method)
- (when (and default (not (test-completion default collection predicate)))
- (setq default (car (completion-try-completion
- default collection predicate (length default)))))
+ ;; Tried both expanding the default before showing the prompt, and
+ ;; removing it when it has no matches. Neither seems natural
+ ;; enough. Removal is confusing; early expansion makes the prompt
+ ;; too long.
(let* ((new-prompt (if default
(format "%s (default %s): " prompt default)
(format "%s: " prompt)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 a089d6a: Don't fiddle with DEFAULT,
Dmitry Gutov <=