Function: hs-hide-level-recursive

hs-hide-level-recursive is a byte-compiled function defined in hideshow.el.gz.

Signature

(hs-hide-level-recursive ARG MINP MAXP)

Documentation

Recursively hide blocks ARG levels below point in region (MINP MAXP).

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/hideshow.el.gz
(defun hs-hide-level-recursive (arg minp maxp)
  "Recursively hide blocks ARG levels below point in region (MINP MAXP)."
  (when (hs-find-block-beginning)
    (setq minp (1+ (point)))
    (funcall hs-forward-sexp-func 1)
    (setq maxp (1- (point))))
  (unless hs-allow-nesting
    (hs-discard-overlays minp maxp))
  (goto-char minp)
  (while (progn
           (forward-comment (buffer-size))
           (and (< (point) maxp)
                (re-search-forward hs-block-start-regexp maxp t)))
    (when (save-match-data
	    (not (nth 8 (syntax-ppss)))) ; not inside comments or strings
      (if (> arg 1)
	  (hs-hide-level-recursive (1- arg) minp maxp)
	(goto-char (match-beginning hs-block-start-mdata-select))
	(hs-hide-block-at-point t))))
  (goto-char maxp))