lisp/minibuffer.el: Fix bug#16808.
authorNicolas Richard <theonewiththeevillook@yahoo.fr>
Mon, 24 Feb 2014 15:41:46 +0000 (16:41 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 24 Feb 2014 15:41:46 +0000 (16:41 +0100)
(completion--try-word-completion): Fix error when completing M-x commands.

lisp/ChangeLog
lisp/minibuffer.el

index a7927fd..da0d2ea 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-24  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+
+       * minibuffer.el (completion--try-word-completion):
+       Fix error when completing M-x commands (bug#16808).
+
 2014-02-24  Leo Liu  <sdl.web@gmail.com>
 
        * emacs-lisp/easy-mmode.el (define-minor-mode): Fix debug spec.
index edc4c95..737172e 100644 (file)
@@ -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