From: Lowell Gilbert <lgusenet@be-well.ilk.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs . How can I associate *.cu files as cc mode as a default ?
Date: Wed, 19 Sep 2007 15:14:19 -0400 [thread overview]
Message-ID: <44wsumo4c4.fsf@be-well.ilk.org> (raw)
In-Reply-To: slrnff2okj.kv0.tyler.smith@blackbart.mynetwork
Tyler Smith <tyler.smith@mail.mcgill.ca> writes:
> On 2007-09-19, Gordon Beaton <n.o.t@for.email> 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.
next prev parent reply other threads:[~2007-09-19 19:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 0:10 Emacs . How can I associate *.cu files as cc mode as a default ? Mike H
2007-09-19 0:28 ` Tyler Smith
2007-09-19 1:09 ` Mike H
2007-09-19 1:25 ` Mike H
2007-09-19 2:01 ` Tyler Smith
2007-09-19 2:04 ` Mike H
2007-09-19 15:13 ` Richard G Riley
2007-09-19 15:47 ` Tyler Smith
2007-09-19 16:15 ` Gordon Beaton
2007-09-19 17:55 ` Tyler Smith
2007-09-19 19:14 ` Lowell Gilbert [this message]
2007-09-19 19:46 ` Stefan Monnier
2007-09-20 23:17 ` Tyler Smith
2007-09-19 6:24 ` Gordon Beaton
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=44wsumo4c4.fsf@be-well.ilk.org \
--to=lgusenet@be-well.ilk.org \
--cc=help-gnu-emacs@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.
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).