(defun isearch-open-overlay-temporary (ov)
(if (not (null (overlay-get ov 'isearch-open-invisible-temporary)))
;; Some modes would want to open the overlays temporary during
- ;; isearch in their own way, they should set the
- ;; `isearch-open-invisible-temporary' to a function doing this.
+ ;; isearch in their own way, they should set the overlay's
+ ;; `isearch-open-invisible-temporary' property to a function
+ ;; doing this.
+ ;; Warning: if your code uses this technique, it should not
+ ;; delete the overlay passed to that function, since the values
+ ;; of the `invisible' property will be recorded on that overlay,
+ ;; to be restored after isearch is done with the text hidden by
+ ;; the overlay.
(funcall (overlay-get ov 'isearch-open-invisible-temporary) ov nil)
;; Store the values for the `invisible' property, and then set it to nil.
;; This way the text hidden by this overlay becomes visible.