If I start Emacs 25 with an init file (.emacs
) containing
(package-initialize)
(load-library "hideshow")
(add-hook 'python-mode-hook (lambda () (hs-minor-mode 1)) )
(setq hs-minor-mode-hook 'hs-hide-initial-comment-block)
then the initial comments in every Python program I load or view are hidden. I can easily unhide them with hs-toggle-hiding
(C-c @ C-c). Yet hiding the comments do not help, but rather get in the way, when the file is brief enough to be displayed in its entirety.
How do I configure hideshow
to hide the initial comment block only if the file loaded is longer than a specific number of lines?