X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-wash.el;h=115c3bb9cc571908c9fafff569a7111e9ea0e302;hp=8455eee0998f05e6e22bd2b81ee050cdcc29f698;hb=e2afcd2594add5186234124dd38b4b2aeabca5bd;hpb=40de245862a26f008c97ea7460620872bda808ae diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index 8455eee0..115c3bb9 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -82,13 +82,14 @@ collapse the remaining lines into a button.") (let* ((new-start (button-start cite-button)) (overlay (button-get cite-button 'overlay)) (button-label (notmuch-wash-button-label overlay)) + (old-point (point)) (inhibit-read-only t)) - (save-excursion - (goto-char new-start) - (insert button-label) - (let ((old-end (button-end cite-button))) - (move-overlay cite-button new-start (point)) - (delete-region (point) old-end)))) + (goto-char new-start) + (insert button-label) + (let ((old-end (button-end cite-button))) + (move-overlay cite-button new-start (point)) + (delete-region (point) old-end)) + (goto-char (min old-point (1- (button-end cite-button))))) (force-window-update) (redisplay t)) @@ -155,7 +156,7 @@ insert before the button, probably for indentation." (let* ((cite-start (match-beginning 0)) (cite-end (match-end 0)) (cite-lines (count-lines cite-start cite-end))) - (overlay-put (make-overlay cite-start cite-end) 'face 'message-cited-text-face) + (overlay-put (make-overlay cite-start cite-end) 'face 'message-cited-text) (when (> cite-lines (+ notmuch-wash-citation-lines-prefix notmuch-wash-citation-lines-suffix 1)) @@ -177,7 +178,7 @@ insert before the button, probably for indentation." (sig-end-marker (make-marker))) (set-marker sig-start-marker sig-start) (set-marker sig-end-marker (point-max)) - (overlay-put (make-overlay sig-start-marker sig-end-marker) 'face 'message-cited-text-face) + (overlay-put (make-overlay sig-start-marker sig-end-marker) 'face 'message-cited-text) (notmuch-wash-region-to-button sig-start-marker sig-end-marker "signature" "\n"))))))