Function: hs-find-block-beg-fn--default
hs-find-block-beg-fn--default is a byte-compiled function defined in
hideshow.el.gz.
Signature
(hs-find-block-beg-fn--default)
Documentation
Reposition point at block-start.
Return point, or nil if original point was not in a block.
Aliases
hs-find-block-beginning (obsolete since 31.1)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/hideshow.el.gz
(defun hs-find-block-beg-fn--default ()
"Reposition point at block-start.
Return point, or nil if original point was not in a block."
(let ((here (point)) done)
;; look if current line is block start
(if (funcall hs-looking-at-block-start-predicate)
here
;; look backward for the start of a block that contains the cursor
(save-excursion
(while (and (re-search-backward hs-block-start-regexp nil t)
(goto-char (match-beginning hs-block-start-mdata-select))
;; go again if in a comment or a string
(or (save-match-data (nth 8 (syntax-ppss)))
(not (setq done (and (<= here (cadr (hs-block-positions)))
(point))))))))
(when done (goto-char done)))))