I want to enable display-line-numbers-mode
in all buffers except pdf
buffers. Can I do that without making a list of all the major modes
except pdf-view mode?
Asked
Active
Viewed 368 times
3

Toothrot
- 3,264
- 1
- 13
- 32
1 Answers
4
Substitute my-pdf-mode-hook
for whichever major-mode that should be excluded.
(global-display-line-numbers-mode t)
(add-hook 'my-pdf-mode-hook (lambda () (display-line-numbers-mode -1)))

lawlist
- 19,106
- 5
- 38
- 120