* gnus-msg.el (gnus-summary-resend-message-edit): Add Gcc header.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 23 Apr 2007 12:21:31 +0000 (12:21 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 23 Apr 2007 12:21:31 +0000 (12:21 +0000)
(gnus-summary-resend-bounced-mail): Ditto; search whole body for parent
 article's Message-ID; refer parent article in summary buffer.

* message.el (message-bounce): Call mime-to-mml.

lisp/ChangeLog
lisp/gnus-msg.el
lisp/message.el

index 9cb10a1..a28c905 100644 (file)
@@ -1,5 +1,11 @@
 2007-04-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * gnus-msg.el (gnus-summary-resend-message-edit): Add Gcc header.
+       (gnus-summary-resend-bounced-mail): Ditto; search whole body for parent
+       article's Message-ID; refer parent article in summary buffer.
+
+       * message.el (message-bounce): Call mime-to-mml.
+
        * dgnushack.el (byte-optimize-form-code-walker): Fix the form which was
        not helpful to Emacs 21.1 and 21.2 for detecting a bug that does not
        optimize and/or forms properly.
index 4c84d83..e67f1c6 100644 (file)
@@ -832,6 +832,7 @@ header line with the old Message-ID."
               (gnus-cache-possibly-remove-article ,article nil nil nil t)
               (gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
        message-send-actions)
+      ;; Add Gcc header.
       (gnus-inews-insert-archive-gcc)
       (gnus-inews-insert-gcc))))
 
@@ -1296,10 +1297,13 @@ composing a new message."
        (message-narrow-to-head-1)
        ;; Gnus will generate a new one when sending.
        (message-remove-header "Message-ID")
-       (message-remove-header message-ignored-resent-headers t)
        ;; Remove unwanted headers.
+       (message-remove-header message-ignored-resent-headers t)
        (goto-char (point-max))
        (insert mail-header-separator)
+       ;; Add Gcc header.
+       (gnus-inews-insert-archive-gcc)
+       (gnus-inews-insert-gcc)
        (goto-char (point-min))
        (when (re-search-forward "^To:\\|^Newsgroups:" nil 'move)
          (forward-char 1))
@@ -1571,15 +1575,29 @@ If FETCH, try to fetch the article that this is a reply to, if indeed
 this is a reply."
   (interactive "P")
   (gnus-summary-select-article t)
-  (set-buffer gnus-original-article-buffer)
-  (gnus-setup-message 'compose-bounce
-    (let* ((references (mail-fetch-field "references"))
-          (parent (and references (gnus-parent-id references))))
+  (let (summary-buffer parent)
+    (if fetch
+       (progn
+         (setq summary-buffer (current-buffer))
+         (set-buffer gnus-original-article-buffer)
+         (article-goto-body)
+         (when (re-search-forward "^References:\n?" nil t)
+           (while (memq (char-after) '(?\t ? ))
+             (forward-line 1))
+           (skip-chars-backward "\t\n ")
+           (setq parent
+                 (gnus-parent-id (buffer-substring (match-end 0) (point))))))
+      (set-buffer gnus-original-article-buffer))
+    (gnus-setup-message 'compose-bounce
       (message-bounce)
+      ;; Add Gcc header.
+      (gnus-inews-insert-archive-gcc)
+      (gnus-inews-insert-gcc)
       ;; If there are references, we fetch the article we answered to.
-      (and fetch parent
-          (gnus-summary-refer-article parent)
-          (gnus-summary-show-all-headers)))))
+      (when parent
+       (with-current-buffer summary-buffer
+         (gnus-summary-refer-article parent)
+         (gnus-summary-show-all-headers))))))
 
 ;;; Gcc handling.
 
index b9829a8..a5ffdfe 100644 (file)
@@ -7117,7 +7117,7 @@ you."
        (goto-char boundary)
        (when (re-search-backward "^.?From .*\n" nil t)
          (delete-region (match-beginning 0) (match-end 0)))))
-    (mm-enable-multibyte)
+    (mime-to-mml)
     (save-restriction
       (message-narrow-to-head-1)
       (message-remove-header message-ignored-bounced-headers t)