I would like to have whitespace-newline-mode enabled every time visual-line-mode is enabled, and disabled correspondingly.
The documentation on "visual-line-mode-hook" says "Hook run after entering or leaving `visual-line-mode'."
I put this in my .emacs :
(add-hook 'visual-line-mode-hook #'whitespace-newline-mode)
When I go into visual-line-mode, I can see the newlines as desired. However, when I go out of visual-line-mode, the newlines are still there, and I have to manually run whitespace-newline-mode to disable it.
Is the visual-line-mode-hook documentation just wrong, or am I missing something fundamental about add-hook here?
(As an aside: how do I configure the color of the newline characters that are displayed when I run whitespace-newline-mode?)