X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-wash.el;h=c4a7a4103726dddbea1e8ebb439180608e615a37;hp=26a3f881163f8c6e4b50604faea685b54e66bc93;hb=7ca4db2b46dc843b8294d7ff44dced9f74c81c1e;hpb=5ebf5efcb0ed316139f9c44a10ddffc09637f596 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index 26a3f881..c4a7a410 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -145,7 +145,7 @@ is what to put on the button." (re-search-forward notmuch-wash-signature-regexp nil t)) (let* ((sig-start (match-beginning 0)) (sig-end (match-end 0)) - (sig-lines (1- (count-lines sig-start (point-max))))) + (sig-lines (count-lines sig-start (point-max)))) (if (<= sig-lines notmuch-wash-signature-lines-max) (let ((sig-start-marker (make-marker)) (sig-end-marker (make-marker))) @@ -190,7 +190,7 @@ is what to put on the button." (defun notmuch-wash-tidy-citations (depth) "Improve the display of cited regions of a message. -Perform four transformations on the message body: +Perform several transformations on the message body: - Remove lines of repeated citation leaders with no other content, @@ -214,17 +214,7 @@ Perform four transformations on the message body: ;; text. (goto-char (point-min)) (while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t) - (replace-match "\\2")) - - ;; Insert a blank line before a citation if there isn't one. - (goto-char (point-min)) - (while (re-search-forward "\\(^[^>]+\\)\n>" nil t) - (replace-match "\\1\n\n>")) - - ;; Insert a blank line after a citation if there isn't one. - (goto-char (point-min)) - (while (re-search-forward "\\(^>.+\\)\n\\([^>]\\)" nil t) - (replace-match "\\1\n\n\\2"))) + (replace-match "\\2"))) ;;