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?
0instead ofpoint-minandbuffer-sizeinstead ofpoint-max. – Drew Jul 29 '17 at 19:12hs-minor-modeall together, but rather just to skip thehs-hide-initial-comment-blockstep. So something like what you wrote, but for thehs-minor-mode-hookinstead. – Omar Jul 29 '17 at 23:06