Synch to No Gnus 200410010354.
[elisp/gnus.git-] / lisp / gnus-msg.el
index 5242448..8f4c193 100644 (file)
@@ -445,7 +445,7 @@ Thank you for your help in stamping out bugs.
                  (not (string= ,group "")))
         (push (cons
                (intern gnus-draft-meta-information-header)
-               (gnus-inews-make-draft ,yanked))
+               (gnus-inews-make-draft (or ,yanked ,article)))
               message-required-headers))
        (unwind-protect
           (progn
@@ -467,15 +467,16 @@ Thank you for your help in stamping out bugs.
 (defun gnus-inews-make-draft-meta-information (group articles)
   (when (numberp articles)
     (setq articles (list articles)))
-  (concat "(\"" group "\" "
+  (concat "(\"" group "\""
          (if articles
-             (mapconcat
-              (lambda (elem)
-                (number-to-string
-                 (if (consp elem)
-                     (car elem)
-                   elem)))
-              articles " ")
+             (concat " "
+                     (mapconcat
+                      (lambda (elem)
+                        (number-to-string
+                         (if (consp elem)
+                             (car elem)
+                           elem)))
+                      articles " "))
            "")
          ")"))
 
@@ -2037,9 +2038,11 @@ this is a reply."
                ;; Obsolete format of header match.
                (and (gnus-buffer-live-p gnus-article-copy)
                     (with-current-buffer gnus-article-copy
-                      (let ((header (message-fetch-field (pop style))))
-                        (and header
-                             (string-match (pop style) header))))))
+                      (save-restriction
+                        (nnheader-narrow-to-headers)
+                        (let ((header (message-fetch-field (pop style))))
+                          (and header
+                               (string-match (pop style) header)))))))
               ((or (symbolp match)
                    (functionp match))
                (cond
@@ -2055,9 +2058,11 @@ this is a reply."
                  ;; New format of header match.
                  (and (gnus-buffer-live-p gnus-article-copy)
                       (with-current-buffer gnus-article-copy
-                        (let ((header (message-fetch-field (nth 1 match))))
-                          (and header
-                               (string-match (nth 2 match) header))))))
+                        (save-restriction
+                          (nnheader-narrow-to-headers)
+                          (let ((header (message-fetch-field (nth 1 match))))
+                            (and header
+                                 (string-match (nth 2 match) header)))))))
                 (t
                  ;; This is a form to be evaled.
                  (eval match)))))