(require 'coolj)
-(declare-function notmuch-show-insert-bodypart "notmuch-show" (msg part depth)
+(declare-function notmuch-show-insert-bodypart "notmuch-show" (msg part depth))
;;
(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)))
;; 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")))
;;