Variable: hs-find-next-block-func

hs-find-next-block-func is a buffer-local variable defined in hideshow.el.gz.

Documentation

Function used to do hs-find-next-block.

It should reposition point at next block start.

It is called with three arguments REGEXP, MAXP, and COMMENTS. REGEXP is a regexp representing block start. When block start is found, match-data should be set using REGEXP. MAXP is a buffer position that bounds the search. When COMMENTS is nil, comments should be skipped. When COMMENTS is not nil, REGEXP matches not only beginning of a block but also beginning of a comment. In this case, the function should find nearest block or comment.

Specifying this function is necessary for languages such as Python, where regexp search is not enough to find the beginning of the next block.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/hideshow.el.gz
(defvar-local hs-find-next-block-func #'hs-find-next-block
  "Function used to do `hs-find-next-block'.
It should reposition point at next block start.

It is called with three arguments REGEXP, MAXP, and COMMENTS.
REGEXP is a regexp representing block start.  When block start is
found, `match-data' should be set using REGEXP.  MAXP is a buffer
position that bounds the search.  When COMMENTS is nil, comments
should be skipped.  When COMMENTS is not nil, REGEXP matches not
only beginning of a block but also beginning of a comment.  In
this case, the function should find nearest block or comment.

Specifying this function is necessary for languages such as
Python, where regexp search is not enough to find the beginning
of the next block.")