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

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

Re: Emacs . How can I associate *.cu files as cc mode as a default ?


From: Lowell Gilbert
Subject: Re: Emacs . How can I associate *.cu files as cc mode as a default ?
Date: Wed, 19 Sep 2007 15:14:19 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (berkeley-unix)

Tyler Smith <address@hidden> writes:

> On 2007-09-19, Gordon Beaton <address@hidden> wrote:
>> On 19 Sep 2007 15:47:19 GMT, Tyler Smith wrote:
>>> (add-hook 'find-file-hook 'my-find-file-hook)
>>>
>>
>> If you want to do this for all files of that type, then c-mode-hook is
>> a better place to put the function, which doesn't need to check the
>> filename:
>>
>>   (add-hook 'c-mode-hook (lambda() (setq c-basic-offset 4)))
>
> Thanks for the suggestion, but this is something I want to use only on 
> files for this particular project, not all c code. 

I have something like this, to avoid needing to put file-local
variables in every file in a subtree:

                   (if (string-match "/path/to/files/" (buffer-file-name))
                                       (my-work-environment))

where my-work-environment is a function I wrote that sets a lot of 
configuration to match corporate source code guidelines.


reply via email to

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