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

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

Re: Per-directory customizations?


From: Kin Cho
Subject: Re: Per-directory customizations?
Date: 30 Apr 2004 17:11:38 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Kevin Rodgers <address@hidden> writes:

> Roy Smith wrote:
>  > In article <address@hidden>,
>  >  Kevin Rodgers <address@hidden> wrote:
>  >>Why not set compile-command in the mode hook, as suggested in it's doc
>  >>string:
>  >>
>  >>(add-hook 'java-mode-hook
>  >>     (lambda ()
>  >>       (when (string-match "\\`~/dev/foo/" default-directory)
>  >>         (set (make-local-variable 'compile-command)
>  >>      "cd ~/dev/foo; ant"))))
>  >
>  > The problem there, is it only works for java files.  I've got all
>  > sorts of files in my project directory tree (html, css, jsp, etc,
>  > etc).  I want the compile command tied to the directory tree, not the
>  > file type.
> 
> The use find-file-hooks instead of jave-mode-hook.

This won't work if he uses dired, gnus, man, etc... while in
~/dev/foo/.

-kin


reply via email to

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