help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: distinguish .h files


From: Pascal J. Bourguignon
Subject: Re: distinguish .h files
Date: Wed, 08 Dec 2010 15:32:49 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Oleksandr Gavenko <gavenko@bifit.com.ua> writes:
>
>>>
>> Suppose header firstly have a lot of '#define', so 'class' keyword
>> far from 'magic-mode-alist'. And .h file was opened in c-mode.
>>
>> I look ALT/MFS headers (not all).
>> Usually 'class' matches near offset in 900 bytes.
>
> Ok well I see your point, but actually I don't know what else really
> distinguish c and c++ headers.
> There are a c++ libraries which I could use, but every time they're
> different.
>
> For such big files that don't reach a class before quitting looking for
> I can set it manually...

By the way, auto-mode-alist regular expressions are applied on the whole
pathname, so you could specify that the .h that are in some directories
are actually C++.

(push '("\\(/usr/include/g++/\\|/home/myself/src/c++project/\\).*\\.h\\'"
        . c++-mode)
      auto-mode-alist)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/


reply via email to

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