diff options
author | Alexander Botero-Lowry <alex.boterolowry@gmail.com> | 2009-11-19 12:30:32 -0800 |
---|---|---|
committer | Alexander Botero-Lowry <alexbl@fortitudo.(none)> | 2009-11-22 15:24:49 -0800 |
commit | 14f492ba0ca2bacd254ebda8a7756731f282f2a4 (patch) | |
tree | 86138f8a11dd375533bb78b2a34799666a98ee2d /notmuch.el | |
parent | a15f174437ac8be5d75ca95721131cdad011baae (diff) |
Buttonize citation expander.
Currently the button has no action or special handling at all.
Diffstat (limited to 'notmuch.el')
-rw-r--r-- | notmuch.el | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -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))) |