[Top][All Lists]

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

Re: Project initialization files?

From: Nix
Subject: Re: Project initialization files?
Date: Sat, 21 Jul 2012 23:06:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

On 17 Jul 2012, Bruce Korb spake thusly:

> Hi Eli,
> On Tue, Jul 17, 2012 at 10:45 AM, Eli Zaretskii <address@hidden> wrote:
>>> ~/my-day-job, I use the "work" style, etc.
>>> Does such a thing already exist?
>> Is the .dir-locals.el feature (described in the "Specifying File
>> Variables" node of the Emacs manual) fit the bill?  If not, why not?
> Only that it entails adding a file to the source tree.

Emacs supports 'directory classes', which let you say things like

(dir-locals-set-directory-class (expand-file-name "~/a/b/c") 'gnu
(dir-locals-set-directory-class (expand-file-name "~/x/y/z") 'linux)
(dir-locals-set-directory-class (expand-file-name "~/foo/bar") 'otbs)

and then you can say e.g.

 'gnu '((c-mode . ((c-file-style . "gnu")
                   (fill-column . 80)
                   (sentence-end-double-space . t)
                   (indent-tabs-mode . t)))))

to set variables in each class to your heart's content, without any need
to touch the directories themselves.

NULL && (void)

reply via email to

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