I'm trying to have whitespace-line-column
set to 80
in prog-mode
and 100
in web-mode
, etc. However when using hooks seems to get ignored, as is always set to 80
.
(require 'whitespace)
(setq whitespace-style '(face trailing tab-mark lines-tail))
(add-hook 'prog-mode-hook '(lambda ()
(interactive)
(whitespace-mode t)
(setq whitespace-line-column 80)))
(add-hook 'web-mode-hook '(lambda ()
(interactive)
(whitespace-mode t)
(setq whitespace-line-column 100)))
What is the correct way to achieve this?