+2007-10-26 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * message.el (message-remove-blank-cited-lines): New function.
+ Suggested by Karl Pl\e,Ad\e(Bsterer.
+
2007-10-25 Katsumi Yamaoka <yamaoka@jpl.org>
* hashcash.el (mail-add-payment): Replace mapcar called for effect with
(forward-line 1))))
(goto-char start))
+(defun message-remove-blank-cited-lines (&optional remove)
+ "Remove cited lines containing only blanks.
+If REMOVE is non-nil, remove newlines, too.
+
+To use this automatically, you may add this function to
+`gnus-message-setup-hook'."
+ (interactive "P")
+ (let ((citexp
+ (concat
+ "^\\("
+ (if (boundp 'message-yank-cited-prefix)
+ (concat message-yank-cited-prefix "\\|"))
+ message-yank-prefix
+ "\\)+ *$"
+ (if remove "\n" ""))))
+ (gnus-message 8 "removing `%s'" citexp)
+ (save-excursion
+ (message-goto-body)
+ (while (re-search-forward citexp nil t)
+ (replace-match "")))))
+
(defvar message-cite-reply-above nil
"If non-nil, start own text above the quote.