X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Fnotmuch-wash.el;h=360419042d0a9db3dc9587f050b666758b57811d;hb=0067a43ea2ee554eafed1e1300a71259cd6b6a6d;hp=70eff63777bf09ad320e9772351d30b97f6e8a8d;hpb=fc4cda07a9afbbb545dcc6cd835ca697f6ef2a1b;p=notmuch diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index 70eff637..36041904 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -237,11 +237,10 @@ that PREFIX should not include a newline." (beginning-of-line) (when (and (< (point) (point-max)) (re-search-forward notmuch-wash-original-regexp nil t)) - (let* ((msg-start (match-beginning 0)) - (msg-end (point-max)) - (msg-lines (count-lines msg-start msg-end))) - (notmuch-wash-region-to-button - msg msg-start msg-end "original"))) + (notmuch-wash-region-to-button msg + (match-beginning 0) + (point-max) + "original")) (while (and (< (point) (point-max)) (re-search-forward notmuch-wash-citation-regexp nil t)) (let* ((cite-start (match-beginning 0)) @@ -262,10 +261,9 @@ that PREFIX should not include a newline." "citation"))))) (when (and (not (eobp)) (re-search-forward notmuch-wash-signature-regexp nil t)) - (let* ((sig-start (match-beginning 0)) - (sig-end (match-end 0)) - (sig-lines (count-lines sig-start (point-max)))) - (when (<= sig-lines notmuch-wash-signature-lines-max) + (let ((sig-start (match-beginning 0))) + (when (<= (count-lines sig-start (point-max)) + notmuch-wash-signature-lines-max) (let ((sig-start-marker (make-marker)) (sig-end-marker (make-marker))) (set-marker sig-start-marker sig-start)