* gnus-msg.el (gnus-summary-yank-message): Don't bind
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 27 Nov 2003 06:54:16 +0000 (06:54 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 27 Nov 2003 06:54:16 +0000 (06:54 +0000)
 gnus-display-mime-function to nil so that non-ascii text is decoded and
 attachments are not shown.

* message.el (message-cite-original-without-signature): Replace the value of
 message-reply-headers with the yanked article since it may be a different
 article from the original.
(message-cite-original): Ditto.

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

index 392c1cf..0f30867 100644 (file)
@@ -1,3 +1,14 @@
+2003-11-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-msg.el (gnus-summary-yank-message): Don't bind
+       gnus-display-mime-function to nil so that non-ascii text is
+       decoded and attachments are not shown.
+
+       * message.el (message-cite-original-without-signature): Replace
+       the value of message-reply-headers with the yanked article since
+       it may be a different article from the original.
+       (message-cite-original): Ditto.
+
 2003-11-25  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-blacklist-ignored-regexes): new variable, so
index bcfffb8..d7ea7a6 100644 (file)
@@ -1480,8 +1480,7 @@ If YANK is non-nil, include the original article."
    (list (completing-read "Buffer: " (mapcar 'list (message-buffers)) nil t)
         current-prefix-arg))
   (gnus-summary-iterate n
-    (let ((gnus-display-mime-function nil)
-         (gnus-inhibit-treatment t))
+    (let ((gnus-inhibit-treatment t))
       (gnus-summary-select-article))
     (save-excursion
       (set-buffer buffer)
index ae08ee6..c1721bf 100644 (file)
@@ -3093,13 +3093,27 @@ prefix, and don't delete any headers."
 
 (defun message-cite-original-without-signature ()
   "Cite function in the standard Message manner."
-  (let ((start (point))
-       (end (mark t))
-       (functions
-        (when message-indent-citation-function
-          (if (listp message-indent-citation-function)
-              message-indent-citation-function
-            (list message-indent-citation-function)))))
+  (let* ((start (point))
+        (end (mark t))
+        (functions
+         (when message-indent-citation-function
+           (if (listp message-indent-citation-function)
+               message-indent-citation-function
+             (list message-indent-citation-function))))
+        ;; This function may be called by `gnus-summary-yank-message' and
+        ;; may insert a different article from the original.  So, we will
+        ;; modify the value of `message-reply-headers' with that article.
+        (message-reply-headers
+         (save-restriction
+           (narrow-to-region start end)
+           (message-narrow-to-head-1)
+           (vector 0
+                   (or (message-fetch-field "subject") "none")
+                   (message-fetch-field "from")
+                   (message-fetch-field "date")
+                   (message-fetch-field "message-id" t)
+                   (message-fetch-field "references")
+                   0 0 ""))))
     (mml-quote-region start end)
     ;; Allow undoing.
     (undo-boundary)
@@ -3128,13 +3142,27 @@ prefix, and don't delete any headers."
   (if (and (boundp 'mail-citation-hook)
           mail-citation-hook)
       (run-hooks 'mail-citation-hook)
-    (let ((start (point))
-         (end (mark t))
-         (functions
-          (when message-indent-citation-function
-            (if (listp message-indent-citation-function)
-                message-indent-citation-function
-              (list message-indent-citation-function)))))
+    (let* ((start (point))
+          (end (mark t))
+          (functions
+           (when message-indent-citation-function
+             (if (listp message-indent-citation-function)
+                 message-indent-citation-function
+               (list message-indent-citation-function))))
+          ;; This function may be called by `gnus-summary-yank-message' and
+          ;; may insert a different article from the original.  So, we will
+          ;; modify the value of `message-reply-headers' with that article.
+          (message-reply-headers
+           (save-restriction
+             (narrow-to-region start end)
+             (message-narrow-to-head-1)
+             (vector 0
+                     (or (message-fetch-field "subject") "none")
+                     (message-fetch-field "from")
+                     (message-fetch-field "date")
+                     (message-fetch-field "message-id" t)
+                     (message-fetch-field "references")
+                     0 0 ""))))
       (mml-quote-region start end)
       (goto-char start)
       (while functions