Function: hs-hide-block
hs-hide-block is an interactive and byte-compiled function defined in
hideshow.el.gz.
Signature
(hs-hide-block &optional END)
Documentation
Select a block and hide it. With prefix arg, reposition at END.
Upon completion, point is repositioned and the normal hook
hs-hide-hook is run. See documentation for run-hooks.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/hideshow.el.gz
(defun hs-hide-block (&optional end)
"Select a block and hide it. With prefix arg, reposition at END.
Upon completion, point is repositioned and the normal hook
`hs-hide-hook' is run. See documentation for `run-hooks'."
(interactive "P")
(hs-life-goes-on
(let ((c-reg (hs-inside-comment-p)))
(cond
((and c-reg (or (null (nth 0 c-reg))
(<= (count-lines (car c-reg) (nth 1 c-reg)) 1)))
(message "(not enough comment lines to hide)"))
((or c-reg
(hs-looking-at-block-start-p)
(hs-find-block-beginning))
(hs-hide-block-at-point end c-reg)
(run-hooks 'hs-hide-hook))))))