[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Language identification

From: Stephen J. Turnbull
Subject: Re: Language identification
Date: Fri, 28 Aug 2009 18:00:25 +0900

Stefan Monnier writes:

 > OTOH, how often do you see a file containg programming language code and
 > yet without ny extension?

Extremely frequently.  The great majority that I see are correctly
identified by file(1) (I believe using libmagic), however, by parsing
the shebang.

There are also cases of multiple extensions, where I've seen (for
example) foo.c.inc used for C implementation code that is used in
multiple contexts (perhaps with different behavior according to
#ifdefs).  This would not be recognized by typical Emacs extension
parsing since although it matches something like "\.c\>", it doesn't
match the more usual idioms of "\.c$" or "\.c\'".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]