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

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

Re: Whitespace mode toggling after setting directory local variables pro


From: Sergey Konoplev
Subject: Re: Whitespace mode toggling after setting directory local variables problem
Date: Tue, 1 Mar 2011 11:45:26 +0300

Hi again,

On 26 February 2011 15:40, Sergey Konoplev <address@hidden> wrote:
> Hi, all.
>
> I added perl-mode-hook toggling whitespace mode globally. I also use
> dir-locals-set-class-variables to set tab-width and indent-tabs-mode
> in perl-mode for a project directory. When I open a perl file from
> this directory it sets the variables properly but whitespace-mode
> looks like it needs to be re-toggled because it highlights some places
> according to the global set tab-width and indent-tabs-mode settings.

It seems like whitespace-mode ignores variables set by
dir-locals-set-class-variables. It can be seen in the
whitespace-report. I stopped using directory local variables for the
sake of this workaround:

(add-hook 'perl-mode-hook
          '(lambda ()
             (if (string-match "/home/gray/repo/someproject"
                               (buffer-file-name))
                 (setq indent-tabs-mode t)
               (setq indent-tabs-mode nil))
             (setq tab-width 4)))

> How to re-toggle it automatically after setting directory local
> variables?
>
> See my perl-mode related configuration is in the attachment.
>
> Thank you in advance.
>
> --
> Sergey Konoplev
>
> Blog: http://gray-hemp.blogspot.com /
> Linkedin: http://ru.linkedin.com/in/grayhemp /
> JID/GTalk: address@hidden / Skype: gray-hemp
>



-- 
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: address@hidden / Skype: gray-hemp



reply via email to

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