]> git.eshelyaron.com Git - emacs.git/commitdiff
Consider non-string minibuffer-default in icomplete
authorJoão Távora <joaotavora@gmail.com>
Thu, 9 Jan 2020 10:01:16 +0000 (10:01 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 9 Jan 2020 10:08:43 +0000 (10:08 +0000)
Fixes: bug#38992
* lisp/icomplete.el (icomplete--sorted-completions): Consider
non-string minibuffer-default.

lisp/icomplete.el

index e7e8cbf6e0a188dc04c79f4fc97bd5fbc1b30310..ceff11f9bd6a972b99433b864ffa2cd0c218b816 100644 (file)
@@ -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)