Why does whitespace-mode fuck up longlines mode when it’s supposed to be disabled?
I’d like to edit markdown files with longlines-mode (word wrapping). Clearly when longlines-mode is enabled, I don’t want to highlight 80+ char lines, as I do when editing code. However, I still want the other whitespace-mode features (highlight trailing spaces, tabs, etc)
I have, in my markdown-mode modehook:
1 2 3
It doesn’t work. Lines longer than 80char still get highlighted.
But indeed ‘lines-tail does not appear in whitespace-style. However, too late: this came after whitespace-mode had initialized, and so it’s already set up.
Moving to a lighlighted char and doing
Disabling font-lock-mode disables all highlighting.
font-lock-fontify-buffer doesn’t do it.
font-lock-keywords-alist does not contain anything pertaining to whitespace-mode.
Hmmm. maybe I can locally redefine the face.
font-lock-keywords is not buffer local. It contains this:
If I remove
lines-tail f rom
whitespace-style before loading the buffer… the offending highlighting does not take place.
So I need to to the remove before enabling whitespace mode? and make it buffer-local?
So, I made sure that the modification to whitespace-style occurred before whitespace-mode was enabled. That did the trick, I think.
1 2 3 4 5 6 7 8 9 10 11