Closed hotpxl closed 9 years ago
never mind, i added the following to .emacs
(add-hook 'prog-mode-hook 'deferred-highlight-indentation-mode)
(defun deferred-highlight-indentation-mode ()
"Run highlight-indentation-mode after reading local variables."
(add-hook 'hack-local-variables-hook
(lambda () (highlight-indentation-mode))))
As an example, by default my
c-basic-offset
is 4, but in a source file I changed my local variable value to 2 (as a first line comment). But as it turns out,highlight-indentation-mode
is invoked before local variables are evaluated, and it will setoffset
to 4. Could you make it respond to local variable changes or suggest a workaround?