]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a bug in completion--flex-adjust-metadata
authorJoão Távora <joaotavora@gmail.com>
Mon, 23 Dec 2019 11:03:13 +0000 (12:03 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 23 Dec 2019 11:03:13 +0000 (12:03 +0100)
If minibuffer-default coincided with the first of completions, the
empty list would be returned.

* lisp/minibuffer.el (completion--flex-adjust-metadata): Make sure
to never return empty list.

lisp/minibuffer.el

index 2dba26818e14c5639557344dd366706664adf55a..6011a493d0b1926b3d90445e0efa5d5333bcd9ea 100644 (file)
@@ -3612,7 +3612,8 @@ that is non-nil."
                for comp = (cadr l)
                when (string-prefix-p minibuffer-default comp)
                do (setf (cdr l) (cddr l))
-               and return (cons comp pre-sorted)))
+               and return (cons comp pre-sorted)
+               finally return pre-sorted))
              (t
               pre-sorted))))))
     `(metadata