From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stjernholm Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: set-auto-mode on case insensitive OS:es [Was: Re: CC Mode 5.30] Date: Sun, 06 Jul 2003 15:03:26 +0200 Sender: cc-mode-help-admin@lists.sourceforge.net Message-ID: <5bfzlj4xk1.fsf_-_@lister.roxen.com> References: <5bhe6119sc.fsf@lister.roxen.com> <5bel1518cr.fsf@lister.roxen.com> <5bznjsenur.fsf@lister.roxen.com> Reply-To: bug-cc-mode@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1057496930 2061 80.91.224.249 (6 Jul 2003 13:08:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 6 Jul 2003 13:08:50 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org Original-X-From: cc-mode-help-admin@lists.sourceforge.net Sun Jul 06 15:08:47 2003 Return-path: Original-Received: from lists.sourceforge.net ([66.35.250.206] helo=sc8-sf-list2.sourceforge.net) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Z9G3-0000Wv-00 for ; Sun, 06 Jul 2003 15:08:47 +0200 Original-Received: from sc8-sf-list1-b.sourceforge.net ([10.3.1.13] helo=sc8-sf-list1.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 3.31-VA-mm2 #1 (Debian)) id 19Z9Go-00077D-00; Sun, 06 Jul 2003 06:09:34 -0700 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by sc8-sf-list1.sourceforge.net with esmtp (Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian)) id 19Z9Fh-0007Wt-00 for ; Sun, 06 Jul 2003 06:08:26 -0700 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.20) id 19Z9FZ-0008Ht-0k for bug-cc-mode@gnu.org; Sun, 06 Jul 2003 09:08:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Z9DD-000859-Ke for bug-cc-mode@gnu.org; Sun, 06 Jul 2003 09:05:53 -0400 Original-Received: from godzilla.roxen.com ([194.52.182.190] helo=mail.roxen.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Z9B4-0006Ey-Db; Sun, 06 Jul 2003 09:03:38 -0400 Original-Received: by mail.roxen.com (Postfix, from userid 52) id 6043099FA; Sun, 6 Jul 2003 15:03:25 +0200 (MEST) Original-Received: from lister.roxen.com (lister.roxen.com [194.52.182.147]) by mail.roxen.com (Postfix) with ESMTP id 1759B99DD; Sun, 6 Jul 2003 15:03:22 +0200 (MEST) Original-Received: from mast by lister.roxen.com with local (Exim 3.36 #1 (Debian)) id 19Z9As-0005F4-00; Sun, 06 Jul 2003 15:03:26 +0200 Original-To: Jason Rumney In-Reply-To: (Jason Rumney's message of "06 Jul 2003 12:28:18 +0100") User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux) Errors-To: cc-mode-help-admin@lists.sourceforge.net X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports, feature requests, and general talk about CC Mode. List-Unsubscribe: , List-Archive: X-Original-Date: Sun, 06 Jul 2003 15:03:26 +0200 Xref: main.gmane.org gmane.emacs.cc-mode.general:619 gmane.emacs.devel:15412 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15412 Jason Rumney wrote: >> /.../ Still, I think the match method used in `set-auto-mode' >> should be changed: > > To what? To what I quoted further down in that mail. I repeat: Wouldn't it be better if it downcased the name and matched it case sensitively instead? The "normal" case in case sensitive systems is afaik lowercase, so patterns that are written without special attention to it use lowercase characters and would match if the name was simply downcased. Also, NT file systems can distinguish between upper and lower case chars visually, even if it doesn't matter when finding files. Thus it could be an idea to try to match the name case sensitively first, and if that fails do another attempt with a downcased name (or with case-fold-search set). > What we have now works, provided the entries are in the right order. It'd be less dependent on order with my suggestion. That'd be a good thing since there's no really good way to control the order on auto-mode-alist from autoload directives in a package, given that one doesn't want to make assumptions on the entries that are already on it. Furthermore, the second paragraph in my suggestion would allow e.g. NT users to handle .c and .C files differently too. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01