Function: kview:first-visible-point

kview:first-visible-point is a byte-compiled function defined in kview.el.

Signature

(kview:first-visible-point &optional POS)

Documentation

Return the first point that is followed by a visible character.

Start from point or optional POS. If not found, return (point-max).

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kview.el
(defun kview:first-visible-point (&optional pos)
  "Return the first point that is followed by a visible character.
Start from point or optional POS.  If not found, return (point-max)."
  (unless pos
    (setq pos (point)))
  (while (and pos (invisible-p pos))
    (if (kproperty:get pos 'invisible)
	(setq pos (kproperty:next-single-change pos 'invisible))
      (let ((overlay (car (delq nil (mapcar (lambda (o) (when (overlay-get o 'invisible) o))
					    (overlays-at pos))))))
	(setq pos (overlay-end overlay)))))
  (or pos (point-max)))