Function: hyrolo-hdr-to-first-line-p
hyrolo-hdr-to-first-line-p is a byte-compiled function defined in
hyrolo.el.
Signature
(hyrolo-hdr-to-first-line-p)
Documentation
If point is within a file header, go to the start of its first line.
If point moves, return t; otherwise, don't move and return nil. Thus, if point is already at the start of the first line ofr the file header, return nil.
The header includes lines matching both hyrolo-hdr-regexp and
hbut:source-prefix.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hyrolo.el
(defun hyrolo-hdr-to-first-line-p ()
"If point is within a file header, go to the start of its first line.
If point moves, return t; otherwise, don't move and return nil. Thus,
if point is already at the start of the first line ofr the file header,
return nil.
The header includes lines matching both `hyrolo-hdr-regexp' and
`hbut:source-prefix'."
(let ((opoint (point)))
;; Skip back over blank lines
(when (looking-at "^[ \t]*$")
(skip-chars-backward " \t\n\r"))
(forward-visible-line 0)
(if (if (zerop (% (count-matches hyrolo-hdr-regexp (point-min) (point)) 2))
(cond ((looking-at hyrolo-hdr-regexp)
;; Now at the start of the first line of a file header
t)
((looking-at hbut:source-prefix)
(forward-visible-line -1)
(hyrolo-hdr-to-first-line-p))
(t
;; Not within a file header
nil))
;; If in a file header, past the first line
(and (hyrolo-hdr-move-after-p)
(re-search-backward hyrolo-hdr-regexp nil t 2)
(progn (forward-visible-line 0)
t)))
(and (/= (point) opoint)
(not (outline-invisible-p)))
(goto-char opoint)
nil)))