From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Halliday Newsgroups: gmane.emacs.help Subject: a mode-specific hack-local-variables-hook ? Date: Wed, 17 Jun 2015 12:54:42 -0700 (PDT) Message-ID: <1402b672-2754-461c-af9c-4bbfe5078a44@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1434570990 2547 80.91.229.3 (17 Jun 2015 19:56:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Jun 2015 19:56:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 17 21:56:15 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z5JRV-0007b6-Mh for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Jun 2015 21:56:13 +0200 Original-Received: from localhost ([::1]:49014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5JRV-0003VM-A9 for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Jun 2015 15:56:13 -0400 X-Received: by 10.129.72.213 with SMTP id v204mr9334375ywa.16.1434570882684; Wed, 17 Jun 2015 12:54:42 -0700 (PDT) X-Received: by 10.140.100.136 with SMTP id s8mr154208qge.2.1434570882563; Wed, 17 Jun 2015 12:54:42 -0700 (PDT) Original-Path: usenet.stanford.edu!q107no1798285qgd.0!news-out.google.com!4ni2052qgh.1!nntp.google.com!q107no1798283qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.13.129.22; posting-account=kRukCAoAAAANs-vsVh9dFwo5kp5pwnPz Original-NNTP-Posting-Host: 82.13.129.22 User-Agent: G2/1.0 Injection-Date: Wed, 17 Jun 2015 19:54:42 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:212730 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105014 Archived-At: Hi all, I recently added this to my init.el (add-hook 'hack-local-variables-hook 'whitespace-mode) so that whitespace-mode would see my local variables before applying its rules. I did this in my major mode hook, thinking that it would just add it to the current mode's hooks, but it seems to be a global hook. Other than putting in an "(if (eq major-mode 'scala-mode) ... )" type test in a lambda? Best regards, Sam