From: Martin Stjernholm <mast@lysator.liu.se>
Cc: bug-cc-mode@gnu.org
Subject: Re: [David Ponce <david.ponce@wanadoo.fr>] Re: CC Mode 5.30
Date: Sat, 05 Jul 2003 22:10:36 +0200 [thread overview]
Message-ID: <5bznjsenur.fsf@lister.roxen.com> (raw)
In-Reply-To: <5bel1518cr.fsf@lister.roxen.com> (Martin Stjernholm's message of "Sat, 05 Jul 2003 14:11:32 +0200")
Martin Stjernholm <mast@lysator.liu.se> wrote:
>> From: David Ponce <david.ponce@wanadoo.fr>
/.../
>> That is definitively the case, when system-type is windows-nt (or
>> cygwin), Emacs can't distinguish ".c" from ".C".
I've now changed the autoload directives in cc-mode.el so that ".c"
comes before ".C" in auto-mode-alist. Still, I think the match method
used in `set-auto-mode' should be changed:
>> Here is the relevant code in function `set-auto-mode' in files.el,
>> that set `case-fold-search' before trying to `string-match' regexps
>> in `auto-mode-alist':
>>
>> (let ((alist auto-mode-alist)
>> (mode nil))
>> ;; Find first matching alist entry.
>> (let ((case-fold-search
>> (memq system-type '(vax-vms windows-nt cygwin))))
>> (while (and (not mode) alist)
>> (if (string-match (car (car alist)) name)
>> ....
>
> 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).
next prev parent reply other threads:[~2003-07-05 20:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5bhe6119sc.fsf@lister.roxen.com>
2003-07-05 12:11 ` [David Ponce <david.ponce@wanadoo.fr>] Re: CC Mode 5.30 Martin Stjernholm
2003-07-05 20:10 ` Martin Stjernholm [this message]
2003-07-06 11:28 ` Jason Rumney
2003-07-06 13:03 ` set-auto-mode on case insensitive OS:es [Was: Re: CC Mode 5.30] Martin Stjernholm
2003-07-07 3:39 ` Richard Stallman
2003-07-07 7:08 ` Jason Rumney
2003-07-07 14:27 ` Stefan Monnier
2003-07-07 19:40 ` Jason Rumney
2003-07-08 20:02 ` Richard Stallman
2003-07-07 16:34 ` [David Ponce <david.ponce@wanadoo.fr>] Re: CC Mode 5.30 Tak Ota
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5bznjsenur.fsf@lister.roxen.com \
--to=mast@lysator.liu.se \
--cc=bug-cc-mode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).