summaryrefslogtreecommitdiff
path: root/lisp/progmodes/project.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-01-30 11:55:19 +0300
committerDmitry Gutov <dgutov@yandex.ru>2016-01-30 11:58:17 +0300
commita089d6a211c9051e27a78d03d5b323300134bb21 (patch)
tree2c1c5b6eecfd6cd562b6d13f73ab3c06ff71e8ea /lisp/progmodes/project.el
parentef760b899ad89f941f552ed2d3ac9e45156f3e3c (diff)
downloademacs-a089d6a211c9051e27a78d03d5b323300134bb21.tar.gz
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.
Diffstat (limited to 'lisp/progmodes/project.el')
-rw-r--r--lisp/progmodes/project.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 0b05de29089..1251bca2491 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)))