aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKim F. Storm2006-12-17 00:48:26 +0000
committerKim F. Storm2006-12-17 00:48:26 +0000
commit203bef736bb814b8bf091add045c67431b4c1263 (patch)
treef828ee995e3874fe12c41ee297eaf8349e259edb /lisp
parente18be861412a6ae7c188ef089f000292b2207ffc (diff)
downloademacs-203bef736bb814b8bf091add045c67431b4c1263.tar.gz
emacs-203bef736bb814b8bf091add045c67431b4c1263.zip
(outline-isearch-open-invisible-function): New defvar.
(outline-flag-region): Use it if non-nil for isearch-open-invisible overlay property instead of outline-isearch-open-invisible.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/outline.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/outline.el b/lisp/outline.el
index 0ec527060a1..b44fd288bfc 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -690,6 +690,11 @@ This puts point at the start of the current subtree, and mark at the end."
690 (goto-char beg))) 690 (goto-char beg)))
691 691
692 692
693(defvar outline-isearch-open-invisible-function nil
694 "Function called if `isearch' finishes in an invisible overlay.
695The function is called with the overlay as its only argument.
696If nil, `show-entry' is called to reveal the invisible text.")
697
693(put 'outline 'reveal-toggle-invisible 'outline-reveal-toggle-invisible) 698(put 'outline 'reveal-toggle-invisible 'outline-reveal-toggle-invisible)
694(defun outline-flag-region (from to flag) 699(defun outline-flag-region (from to flag)
695 "Hide or show lines from FROM to TO, according to FLAG. 700 "Hide or show lines from FROM to TO, according to FLAG.
@@ -698,7 +703,9 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
698 (when flag 703 (when flag
699 (let ((o (make-overlay from to))) 704 (let ((o (make-overlay from to)))
700 (overlay-put o 'invisible 'outline) 705 (overlay-put o 'invisible 'outline)
701 (overlay-put o 'isearch-open-invisible 'outline-isearch-open-invisible))) 706 (overlay-put o 'isearch-open-invisible
707 (or outline-isearch-open-invisible-function
708 'outline-isearch-open-invisible))))
702 ;; Seems only used by lazy-lock. I.e. obsolete. 709 ;; Seems only used by lazy-lock. I.e. obsolete.
703 (run-hooks 'outline-view-change-hook)) 710 (run-hooks 'outline-view-change-hook))
704 711