Function: hfy-find-invisible-ranges

hfy-find-invisible-ranges is a byte-compiled function defined in htmlfontify.el.gz.

Signature

(hfy-find-invisible-ranges)

Documentation

Return a list of (start-point . end-point) cons cells of invisible regions.

Source Code

;; Defined in /usr/src/emacs/lisp/htmlfontify.el.gz
(defun hfy-find-invisible-ranges ()
  "Return a list of (start-point . end-point) cons cells of invisible regions."
  (save-excursion
    (let (invisible p i s) ;; return-value pos invisible end start
      (setq p (goto-char (point-min)))
      (when (invisible-p p) (setq s p i t))
      (while (< p (point-max))
        (if i ;; currently invisible
            (when (not (invisible-p p)) ;; but became visible
              (setq i         nil
                    invisible (cons (cons s p) invisible)))
          ;; currently visible:
          (when (invisible-p p)  ;; but have become invisible
            (setq s p i t)))
        (setq p (next-char-property-change p)))
      ;; still invisible at buffer end?
      (when i
        (setq invisible (cons (cons s (point-max)) invisible)))
      invisible)))