From: João Távora Date: Mon, 23 Dec 2019 11:03:13 +0000 (+0100) Subject: Fix a bug in completion--flex-adjust-metadata X-Git-Tag: emacs-27.0.90~304 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c7e6b62d9e2f56bad176d391238e5d0ec7c28ade;p=emacs.git Fix a bug in completion--flex-adjust-metadata 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. --- diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 2dba26818e1..6011a493d0b 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -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