emacs: More functionality for `notmuch-wash-tidy-citations'.

Add:
- Insert a blank line before a citation if there isn't one,
- Insert a blank line after a citation if there isn't one.
This commit is contained in:
David Edmondson 2010-05-04 15:53:29 +01:00 committed by Carl Worth
parent 636925b40b
commit 5ebf5efcb0

View file

@ -214,7 +214,17 @@ Perform four transformations on the message body:
;; text. ;; text.
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t) (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")))
;; ;;