From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Bugs in newly added completion capabilities. Date: Fri, 01 Jul 2005 10:59:46 -0400 Message-ID: <87br5mbmra.fsf-monnier+emacs@gnu.org> References: <200506280227.j5S2Rln23310@raven.dms.auburn.edu> <200506290350.j5T3o7c25749@raven.dms.auburn.edu> <200506300229.j5U2TrL01627@raven.dms.auburn.edu> <200506301828.j5UISL305879@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1120229749 18709 80.91.229.2 (1 Jul 2005 14:55:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Jul 2005 14:55:49 +0000 (UTC) Cc: miles@gnu.org, Luc Teirlinck , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 01 16:55:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DoMvb-0006Vc-0R for ged-emacs-devel@m.gmane.org; Fri, 01 Jul 2005 16:55:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DoN44-0003jy-7e for ged-emacs-devel@m.gmane.org; Fri, 01 Jul 2005 11:04:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DoN2m-00038f-8O for emacs-devel@gnu.org; Fri, 01 Jul 2005 11:03:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DoN2h-00036b-VC for emacs-devel@gnu.org; Fri, 01 Jul 2005 11:03:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DoN2h-000358-Cj for emacs-devel@gnu.org; Fri, 01 Jul 2005 11:02:59 -0400 Original-Received: from [209.226.175.184] (helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DoN4j-0001qX-Nv; Fri, 01 Jul 2005 11:05:05 -0400 Original-Received: from alfajor ([67.71.27.2]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050701145947.QDVC21470.tomts22-srv.bellnexxia.net@alfajor>; Fri, 1 Jul 2005 10:59:47 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id D165BD73E0; Fri, 1 Jul 2005 10:59:46 -0400 (EDT) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Fri, 01 Jul 2005 10:14:08 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40034 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40034 >> since the following change made relatively recently (I thought we were >> in a feature freeze, but anyway): >> >> 2005-02-22 Kim F. Storm >> >> * minibuf.c (Ftry_completion, Fall_completions): Allow >> both string and symbol keys in alists and hash tables. >> >> Again I am not arguing for or against the desirability of this change, >> I am trying to deal with its consequences. > I changed them to support the following change: > 2005-02-22 Kim F. Storm > * progmodes/hideif.el (hide-ifdef-use-define-alist): > Use completing-read. Suggested by Juan-Leon Lahoz Garcia. Then I simply suggest the patch below. Then we can revert your change and forget about this idea of allowing symbols in completion lists. I mean, honestly, why make the primitives try-completion, all-completions, and test-completions yet more hairy for this one particular case, which is not even an often used piece of code and where the workaround won't even lead to any noticeable performance hit, seeing how hide-ifdef-define-alist is unlikely to grow large. Stefan --- hideif.el 04 avr 2005 09:53:32 -0400 1.50 +++ hideif.el 01 jui 2005 10:53:14 -0400 @@ -960,7 +960,9 @@ "Set `hide-ifdef-env' to the define list specified by NAME." (interactive (list (completing-read "Use define list: " - hide-ifdef-define-alist nil t))) + (mapcar (lambda (x) (symbol-name (car x))) + hide-ifdef-define-alist) + nil t))) (if (stringp name) (setq name (intern name))) (let ((define-list (assoc name hide-ifdef-define-alist))) (if define-list