From: Alexander Botero-Lowry Date: Thu, 19 Nov 2009 20:30:32 +0000 (-0800) Subject: Buttonize citation expander. X-Git-Tag: 0.1~363^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=14f492ba0ca2bacd254ebda8a7756731f282f2a4;p=notmuch.git Buttonize citation expander. Currently the button has no action or special handling at all. --- diff --git a/notmuch.el b/notmuch.el index a5474158..67e87ea2 100644 --- a/notmuch.el +++ b/notmuch.el @@ -490,10 +490,17 @@ which this thread was originally shown." (forward-line)) (let ((overlay (make-overlay beg-sub (point)))) (overlay-put overlay 'invisible 'notmuch-show-citation) - (overlay-put overlay 'before-string - (concat indent - "[" (number-to-string (count-lines beg-sub (point))) - "-line citation. Press 'c' to show.]\n"))))) + (let ( + (p (point)) + (cite-button-text (concat "[" (number-to-string (count-lines beg-sub (point))) + "-line citation. Press 'c' to show.]")) + ) + (goto-char (- beg-sub 1)) + (insert (concat "\n" indent)) + (insert-button cite-button-text) + (insert "\n") + (goto-char (+ (length cite-button-text) p)) + )))) (move-to-column depth) (if (looking-at notmuch-show-signature-regexp) (let ((sig-lines (- (count-lines beg-sub end) 1)))