Open philc opened 11 months ago
I discovered that the help window I was interested in runs ghelp-page-mode-hook, which I was able to use to turn on line wrapping.
(defun on-ghelp-page-mode-hook ()
(visual-line-mode 1))
(add-hook 'ghelp-page-mode-hook 'on-ghelp-page-mode-hook)
Yeah, that's what I would suggest.
ghelp should provide a ghelp-mode-hook.
This can be achieved with
run-mode-hooks
(docs).My use case is that I want to turn on visual-line-mode for ghelp buffers, but not other buffers. I'm not sure if the ghelp-mode-hook is the best place for it, but it's the first place I tried, and I was surprised that there was no such hook.