On Tue, 27 Apr 1999 14:11:11 PDT, Darryl Okahata quoted somebody else as saying:
This is simpler:
;;; Local Variables:
;;; eval: (defun byte-compile-this-file () (write-region (point-min) (point-max)
buffer-file-name nil 't) (byte-compile-file buffer-file-name t) t)
;;; write-file-hooks: (byte-compile-this-file)
;;; End:
OK all. This is probably list abuse, but.. ;)
The documentation for enable-local-variables says:
A value of t means local-variables lists are obeyed;
nil means they are ignored; anything else means query.
I run with 'nil' so I can't get trojaned by visiting a malicious file.
'query' is just too damned much a pain in the ass. Is there any way
to have it call a user-supplied hook function that would check file
ownership, etc etc. For instance, if I don't own the file, it should
query. If I do own it and have visited it before, it should obey. If
the filename matches a regexp, it should obey/query. And so on...
/Valdis (Who wishes there was a setting that meant "Obey it if I was
the one who put it in there in the first place" ;)