bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16808: 24.3.50; an error when completing M-x ... commands.


From: Nicolas Richard
Subject: bug#16808: 24.3.50; an error when completing M-x ... commands.
Date: Mon, 24 Feb 2014 16:03:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> -     (when (and (= 1 (length comps) (consp (car comps))))
>>> +     (when (and (= 1 (length comps)) (consp (car comps)))
>> (= 1 (length comps)) would be better written as (not (cdr comps)) in
>> this context.
>
> Both look good, please install,

FWIW I'm unable to do that. If there's anything I can do to make
someone's life easier for installing I'll be happy to do so. Meanwhile,
here's an updated patch:

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index edc4c95..7f98005 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1371,7 +1371,7 @@ appear to be a match."
                                   (concat before ext after)
                                   table predicate (1+ point) md))
                                exts))))
-         (when (and (= 1 (length comps) (consp (car comps))))
+         (when (and (null (cdr comps)) (consp (car comps)))
            (setq comp (car comps)))))
 
       ;; Completing a single word is actually more difficult than completing
@@ -1451,7 +1451,7 @@ Return nil if there is no valid completion, else t."
         (minibuffer-completion-predicate predicate))
     (pcase (completion--do-completion beg end
                                       #'completion--try-word-completion)
-    (#b000 nil)
+      (#b000 nil)
       (_     t))))
 
 (defface completions-annotations '((t :inherit italic))


-- 
Nico.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]