X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-wash.el;h=26a3f881163f8c6e4b50604faea685b54e66bc93;hb=fd16b37dc1b59dac765d459459ce00907506d559;hp=bf0a3544d0cf82f38d256afac9a852901722ff43;hpb=43423e9c88e2c054ecd8328e82837867121af281;p=notmuch diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index bf0a3544..26a3f881 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -23,7 +23,7 @@ (require 'coolj) -(declare-function notmuch-show-insert-bodypart "notmuch-show" (msg part depth) +(declare-function notmuch-show-insert-bodypart "notmuch-show" (msg part depth)) ;; @@ -214,7 +214,17 @@ Perform four transformations on the message body: ;; text. (goto-char (point-min)) (while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t) - (replace-match "\\2"))) + (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"))) ;;