Function: hs-hide-block

hs-hide-block is an interactive and byte-compiled function defined in hideshow.el.gz.

Signature

(hs-hide-block)

Documentation

Select a block and hide it.

This command runs hs-hide-hook.

View in manual

Probably introduced at or before Emacs version 31.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/hideshow.el.gz
(defun hs-hide-block ()
  "Select a block and hide it.
This command runs `hs-hide-hook'."
  (interactive)
  (hs-life-goes-on
   (let ((c-reg (funcall hs-inside-comment-predicate)))
     (cond
      ((and c-reg (not (apply #'hs-hideable-region-p c-reg)))
       (user-error "(not enough comment lines to hide)"))
      ((or c-reg (hs-get-near-block))
       (hs-hide-block-at-point c-reg)))
     (run-hooks 'hs-hide-hook))))