Function: isearch-open-necessary-overlays

isearch-open-necessary-overlays is a byte-compiled function defined in isearch.el.gz.

Signature

(isearch-open-necessary-overlays OV)

Source Code

;; Defined in /usr/src/emacs/lisp/isearch.el.gz
;; This is called at the end of isearch.  It will open the overlays
;; that contain the latest match.  Obviously in case of a C-g the
;; point returns to the original location which surely is not contain
;; in any of these overlays, se we are safe in this case too.
(defun isearch-open-necessary-overlays (ov)
  (when (overlay-buffer ov)
    (let ((inside-overlay (and  (> (point) (overlay-start ov))
                                (<= (point) (overlay-end ov))))
          ;; If this exists it means that the overlay was opened using
          ;; this function, not by us tweaking the overlay properties.
          (fct-temp (overlay-get ov 'isearch-open-invisible-temporary)))
      (when (or inside-overlay (not fct-temp))
        ;; restore the values for the `invisible' properties.
        (overlay-put ov 'invisible (overlay-get ov 'isearch-invisible))
        (overlay-put ov 'isearch-invisible nil))
      (if inside-overlay
          (funcall (overlay-get ov 'isearch-open-invisible)  ov)
        (if fct-temp
            (funcall fct-temp ov t))))))