[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 eb3c6ad 1/2: Consider non-string minibuffer-default in icomplet
From: |
João Távora |
Subject: |
emacs-27 eb3c6ad 1/2: Consider non-string minibuffer-default in icomplete |
Date: |
Thu, 9 Jan 2020 05:09:41 -0500 (EST) |
branch: emacs-27
commit eb3c6ad325ea54acbea047508b5496d130bff93a
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Consider non-string minibuffer-default in icomplete
Fixes: bug#38992
* lisp/icomplete.el (icomplete--sorted-completions): Consider
non-string minibuffer-default.
---
lisp/icomplete.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index e7e8cbf..ceff11f 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)