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

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

Re: how to reference the current *.el file in elisp


From: Barry Margolin
Subject: Re: how to reference the current *.el file in elisp
Date: Sun, 28 Jun 2009 23:10:54 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <878wjd1926.fsf@jidanni.org>, jidanni@jidanni.org wrote:

> BM> (message "Hello %s" load-file-name)
> How do I do things like
> # Local Variables:
> # mode: Shell-script
> # compile-command: (concat "sh " buffer-file-name)
> # End:
> without being asked about risky variables, or hard wiring buffer-file-name?

Why don't you just create a shell-script-mode hook that sets 
compile-command?  This seems like a mode-specific setting, not a 
file-specific setting.

But if you want to customize risky local variables, see the 
safe-local-variables-p function.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


reply via email to

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