From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.bugs Subject: bug#16808: 24.3.50; an error when completing M-x ... commands. Date: Mon, 24 Feb 2014 16:03:13 +0100 Message-ID: <8761o4eeoe.fsf@yahoo.fr> References: <87eh2zgxch.fsf@yahoo.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393254253 9323 80.91.229.3 (24 Feb 2014 15:04:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Feb 2014 15:04:13 +0000 (UTC) Cc: 16808@debbugs.gnu.org, Andreas Schwab , Nicolas Richard To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 24 16:04:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WHx4s-00087A-JG for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Feb 2014 16:04:18 +0100 Original-Received: from localhost ([::1]:58152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHx4s-0005na-7V for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Feb 2014 10:04:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHx4i-0005mL-Sk for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 10:04:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHx4d-0007gV-1Y for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 10:04:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHx4c-0007gO-To for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 10:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WHx4c-0002lX-8J for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 10:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Feb 2014 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16808 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16808-submit@debbugs.gnu.org id=B16808.139325418810537 (code B ref 16808); Mon, 24 Feb 2014 15:04:01 +0000 Original-Received: (at 16808) by debbugs.gnu.org; 24 Feb 2014 15:03:08 +0000 Original-Received: from localhost ([127.0.0.1]:37939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHx3k-0002js-6l for submit@debbugs.gnu.org; Mon, 24 Feb 2014 10:03:08 -0500 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:43902) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHx3g-0002jf-BM for 16808@debbugs.gnu.org; Mon, 24 Feb 2014 10:03:05 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAEJeC1OkD4Xx/2dsb2JhbABZxQaBLHSCJgEFeRAIAyElDwEESRMZh1cBFKVxmAYBiAkXh2OHAQeEOASYNIYxi3aDLjs Original-Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 24 Feb 2014 16:03:01 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 19 Feb 2014 09:31:28 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86127 Archived-At: Stefan Monnier 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.