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

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

Re: Per-directory init files?


From: E.L.K.
Subject: Re: Per-directory init files?
Date: Tue, 9 Sep 2008 22:47:31 +0300

On Wed, Aug 27, 2008 at 09:25:32AM -0400, Roy Smith wrote:
> Is there any way to have per-directory init files?
> 
> I've got a directory where I need to run "./install" after each round of 
> edits to any file in that directory.  What I'd like to do is make 
> "./install" my default compile command, but only when I'm in that 
> directory.  How can I do that?
> 
> I'm running GNU Emacs 22.1.1 on OSX-10.5.  Amazingly enough, OSX doesn't 
> seem to ship with make, so I can't just put a Makefile in my directory with 
> "./install" as the default action :-(

You can, actually, place in your ~/.emacs something like that:

(if (file-readable-p ".vars")
(load-file ".vars")
)

so, when emacs will be started in some directory, it will check
if there ".vars" file there (as .emacs executed there) and if so,
will load it.

and in file ".vars" you can place 
(setq compile-command "./install")

i haven't tested this, but this should work

-- 
E.L.K.
Tuesday, 09 of September, 2008, 22:45

зы. C_U_L8r!




reply via email to

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