Possible Duplicate:
How can I move php-mode settings from .emacs to .dir-locals.el?
In Emacs, one can set up a file to eval arbitrary code when it is opened (after prompting the user, of course) by putting something like the following in the local variables section at the end of the file:
;; Local Variables:
;; eval: (message "This is evaluated when the file is opened in emacs.")
;; End:
Emacs also has a feature for putting variables in a file called .dir-locals.el
, and having those variables apply to any file in the directory. However, this file does not seem to support evaluation of arbitrary code. Is there a way to do this at the directory level?