[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dir-specific grep-find-command?
From: |
Ed L Cashin |
Subject: |
Re: dir-specific grep-find-command? |
Date: |
Thu, 19 Jun 2003 01:13:36 -0400 |
User-agent: |
Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-debian-linux-gnu) |
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> Ed L Cashin wrote:
[ugly override of grep-find]
...
> How about something like this:
>
> (defun in-kernel-hook ()
> "If `in-kernel', override global `grep-find-command' value."
> (if (in-kernel 0)
> (set (make-local-variable 'grep-find-command) "kern-grep-find")))
>
> (add-hook 'find-file-hooks 'in-kernel-hook)
> (add-hook 'dired-mode-hook 'in-kernel-hook)
Excellent! That seems to do exactly what I wanted.
Did you already know about those hooks or did you just know how to
find them, because I guess I failed to find them.
--
--Ed L Cashin PGP public key: http://noserose.net/e/pgp/