]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-wash.el
test: Don't mess with user's HOME directory
[notmuch] / emacs / notmuch-wash.el
index bf0a3544d0cf82f38d256afac9a852901722ff43..26a3f881163f8c6e4b50604faea685b54e66bc93 100644 (file)
@@ -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")))
 
 ;;