except mode

dired no hiline

I was trying to make sure that hl-line mode (to highlight a line) is not on in my dired buffers without changing its presence anywhere else, since it messes up display of my diredfl permission faces. Unfortunately, the following didn’t work, probably because “setting” isn’t the same thing as calling the variable. What was the best way to selectively disable hl-line-mode? There were many good answers on Reddit1. (add-hook 'dired-mode-hook (lambda () (setq-local global-hl-line-mode nil hl-line-mode nil) ;; I wasn't sure on the relationship between ;; these two, or even which one was being used )) Learning along the way: global- is unrelated to hl-line-mode It turns out that global-hl-line does not share anything in common with hl-line-mode other than the end result, so altering one does not alter the other.