From: teranisi Date: Thu, 17 Jul 2003 11:49:58 +0000 (+0000) Subject: * wl-draft.el (wl-draft-normal-send-func): Fixed bug for removing X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb0e8a3bc0367d737c47abd87f9aed8e5e744215;p=elisp%2Fwanderlust.git * wl-draft.el (wl-draft-normal-send-func): Fixed bug for removing empty lines. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index e260030..e1dbe78 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2003-07-17 Yuuichi Teranishi + + * wl-draft.el (wl-draft-normal-send-func): Fixed bug for removing + empty lines. + 2003-07-05 Yuuichi Teranishi * 2.10.1 is released. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index b32e4fb..42f7d67 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1161,15 +1161,24 @@ If FORCE-MSGID, insert message-id regardless of `wl-insert-message-id'." (defun wl-draft-normal-send-func (editing-buffer kill-when-done) "Send the message in the current buffer." (save-restriction - (std11-narrow-to-header mail-header-separator) + (narrow-to-region (goto-char (point-min)) + (if (re-search-forward + (concat + "^" (regexp-quote mail-header-separator) "$") + nil t) + (match-beginning 0) + (point-max))) (wl-draft-insert-required-fields) - ;; Delete null fields. - (goto-char (point-min)) - (while (re-search-forward "^[^ \t\n:]+:[ \t]*\n" nil t) - (replace-match "")) ;; ignore any blank lines in the header - (while (re-search-forward "\n\n\n*" nil t) - (replace-match "\n"))) + (while (progn (goto-char (point-min)) + (re-search-forward "\n[ \t]*\n\n*" nil t)) + (replace-match "\n")) + (goto-char (point-min)) + (while (re-search-forward + "^[^ \t\n:]+:[ \t]*\\(.*\\(\n[ \t].*\\)*\\)\n" + nil t) + (when (string= "" (match-string 1)) + (replace-match "")))) ;;; (run-hooks 'wl-mail-send-pre-hook) ;; X-PGP-Sig, Cancel-Lock (wl-draft-dispatch-message) (when kill-when-done