From: bojohan+news@dd.chalmers.se (Johan Bockgård)
Subject: Re: Per-directory customizations?
Date: Sat, 01 May 2004 01:54:50 +0200 [thread overview]
Message-ID: <yoijbrl9vx6d.fsf@frealaf.dd.chalmers.se> (raw)
In-Reply-To: 4092E5A4.2050302@yahoo.com
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> Roy Smith wrote:
>> Kevin Rodgers <ihs_4664@yahoo.com> 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.
There is another way, using
(setq compile-command
'<lisp expression that evaluates to a string>)
like
(setq compile-command
'(cond ((string-match "\\`~/dev/foo/" default-directory)
"cd ~/dev/foo; ant")
(...)
...
(t "make -k")))
etc.
--
Johan Bockgård
next prev parent reply other threads:[~2004-04-30 23:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-30 12:30 Per-directory customizations? Roy Smith
2004-04-30 15:38 ` Kin Cho
2004-04-30 19:01 ` Kevin Rodgers
2004-04-30 19:27 ` Roy Smith
2004-04-30 23:47 ` Kevin Rodgers
2004-04-30 23:54 ` Johan Bockgård [this message]
2004-05-01 0:11 ` Kin Cho
2004-05-03 14:12 ` Stefan Monnier
2004-05-03 16:19 ` Kin Cho
2004-04-30 17:13 ` Vagn Johansen
2004-04-30 21:14 ` Stefan Monnier
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=yoijbrl9vx6d.fsf@frealaf.dd.chalmers.se \
--to=bojohan+news@dd.chalmers.se \
/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).