From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: how to reference the current *.el file in elisp Date: Sun, 28 Jun 2009 23:10:54 -0400 Organization: A noiseless patient Spider Message-ID: References: <878wjd1926.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1246251725 9591 80.91.229.12 (29 Jun 2009 05:02:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2009 05:02:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 29 07:01:58 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ML909-0005F4-Qp for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jun 2009 07:01:58 +0200 Original-Received: from localhost ([127.0.0.1]:33397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ML909-0004te-1O for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jun 2009 01:01:57 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin2!goblin.stu.neva.ru!feeder.erje.net!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!news.eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-X-Trace: news.eternal-september.org U2FsdGVkX19MPtVnsCZMARDxcWedxX8JXZ59suA9aKCJSorgHe7N1WsGQGUoZAb6byQJ37PzAsZaXWppfZZ76pxVXetor/6Lu2TyUfOJZ+ZCXwNHfZwHmtZZv4vfxKFUf1J60aUEfw8= Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Mon, 29 Jun 2009 03:13:40 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19mC3HmvfAPUcVujPRB/Vf0ItGKV0wIIE0= Cancel-Lock: sha1:lWCLPc/0gPKP1VwLs8GxNhHxbk4= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Mail-Copies-To: nobody Original-Xref: news.stanford.edu gnu.emacs.help:170408 X-Mailman-Approved-At: Mon, 29 Jun 2009 01:00:03 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65620 Archived-At: 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 ***