In my init file I have this:
(add-hook 'prog-mode-hook (lambda () (linum-mode 1)))
So it shows line numbers only for programming modes. I tried to do the same with hl-line-mode
, but it does not work:
(add-hook 'prog-mode-hook (lambda () (hl-line-mode 1)))
Why is that? Both are buffer-local minor modes, according to the documentation.
Thank you.