[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a mode-specific hack-local-variables-hook ?
From: |
Sam Halliday |
Subject: |
Re: a mode-specific hack-local-variables-hook ? |
Date: |
Wed, 17 Jun 2015 13:19:30 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Wednesday, 17 June 2015 20:54:43 UTC+1, Sam Halliday wrote:
> 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?
Apologies, I appear to have completely failed to write a complete sentence here!
What I meant to say was:
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 (outside of my
major mode hook), is there any other way to set a buffer-local
hack-local-variables-hook?