summaryrefslogtreecommitdiff
path: root/lisp/icomplete.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2020-01-09 10:01:16 +0000
committerJoão Távora <joaotavora@gmail.com>2020-01-09 10:08:43 +0000
commiteb3c6ad325ea54acbea047508b5496d130bff93a (patch)
tree567ab0ff785e5b91b4e9d156afce56be3ccba911 /lisp/icomplete.el
parent1fe596d89f9398f887bde7174bede39270065f9e (diff)
downloademacs-eb3c6ad325ea54acbea047508b5496d130bff93a.tar.gz
Consider non-string minibuffer-default in icomplete
Fixes: bug#38992 * lisp/icomplete.el (icomplete--sorted-completions): Consider non-string minibuffer-default.
Diffstat (limited to 'lisp/icomplete.el')
-rw-r--r--lisp/icomplete.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index e7e8cbf6e0a..ceff11f9bd6 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -448,13 +448,14 @@ Usually run by inclusion in `minibuffer-setup-hook'."
with end = (icomplete--field-end)
with all = (completion-all-sorted-completions beg end)
for fn in (cond ((and minibuffer-default
+ (stringp minibuffer-default) ; bug#38992
(= (icomplete--field-end) (icomplete--field-beg)))
- ;; When we have a non-nil default and no input
- ;; whatsoever: we want to make sure that default
- ;; is bubbled to the top so that
+ ;; When we have a non-nil string default and
+ ;; no input whatsoever: we want to make sure
+ ;; that default is bubbled to the top so that
;; `icomplete-force-complete-and-exit' will
- ;; select it (do that even if the match doesn't
- ;; match the completion perfectly.
+ ;; select it (do that even if the match
+ ;; doesn't match the completion perfectly.
`(,(lambda (comp)
(equal minibuffer-default comp))
,(lambda (comp)