From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: change to try-completion behavior in 21.3? Date: Sat, 17 Dec 2005 04:27:41 -0500 Organization: Bell Sympatico Message-ID: <877ja4oz29.fsf-monnier+gnu.emacs.help@gnu.org> References: <1134700362.513388.325830@g49g2000cwa.googlegroups.com> <87irtopi9u.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134813639 21394 80.91.229.2 (17 Dec 2005 10:00:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 17 Dec 2005 10:00:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 17 11:00:38 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EnYrI-0002Fq-9w for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Dec 2005 11:00:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EnYqV-0001uS-Vq for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Dec 2005 04:59:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!news.glorb.com!wns13feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:X0vv2lxTchIvLvGeDC0VFP1JZm8= Original-Lines: 30 Original-NNTP-Posting-Host: 65.92.242.250 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1134811661 65.92.242.250 (Sat, 17 Dec 2005 04:27:41 EST) Original-NNTP-Posting-Date: Sat, 17 Dec 2005 04:27:41 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:136351 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32014 Archived-At: >>> Why should it ever return the capital letter W? >> Because in your completion table, you have "W". > "w" was also in the table. Good point. Could you give us more detail about your context: why do you have such a table with two redundant entries and why do you care which of the two is returned? > This change > revision 1.237 > date: 2002-04-09 19:28:42 +0000; author: monnier; state: Exp; lines: +89 -47 [...] > (Ftry_completion): Allow lambda forms and lists of strings for > `alist'. > Short-circuit the search as soon as it "failed". [...] > added this piece of code (approximately) > if (matchsize <= SCHARS (string) > && matchcount > 1) > /* No need to look any further. */ > break; > When completion-ignore-case is t this doesn't necessarily find the > best match _including case_ (AFAICS). Yes, I'd completely forgotten about this one ;-) Stefan