aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-wash.el
diff options
context:
space:
mode:
authorGravatar David Edmondson <dme@dme.org>2010-04-23 18:39:33 +0100
committerGravatar Carl Worth <cworth@cworth.org>2010-04-24 07:38:28 -0700
commit7c5f017a30bda339eacb4cdde08a9a7aee3662f4 (patch)
tree513c424c52f7a755c10ab90957883c46e93f4af5 /emacs/notmuch-wash.el
parent138fd38afe6c6d44179952dd17c4b07e9223ad37 (diff)
emacs: Fix i-search to open up invisible citations as necessary
Add an `isearch-open-invisible' property to the overlays used to hide citations and signatures, together with an appropriate function to leave the invisible text visible should that be required.
Diffstat (limited to 'emacs/notmuch-wash.el')
-rw-r--r--emacs/notmuch-wash.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 54a380a1..5ca567f5 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -77,6 +77,9 @@ collapse the remaining lines into a button.")
'help-echo "mouse-1, RET: Show signature"
:supertype 'notmuch-wash-button-invisibility-toggle-type)
+(defun notmuch-wash-region-isearch-show (overlay)
+ (remove-from-invisibility-spec (overlay-get overlay 'invisible)))
+
(defun notmuch-wash-region-to-button (beg end type prefix button-text)
"Auxilary function to do the actual making of overlays and buttons
@@ -96,6 +99,7 @@ is what to put on the button."
type "-toggle-type"))))
(add-to-invisibility-spec invis-spec)
(overlay-put overlay 'invisible invis-spec)
+ (overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show)
(goto-char (1+ end))
(save-excursion
(goto-char (1- beg))