Importing pgnus-0.22.
[elisp/gnus.git-] / lisp / gnus-int.el
index 6eff329..505c284 100644 (file)
@@ -308,7 +308,7 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group."
               (gnus-group-real-name group) article))))
 
 (defun gnus-request-update-mark (group article mark)
-  "Return the type (`post' or `mail') of GROUP (and ARTICLE)."
+  "Allow the backend to change the mark the user tries to put on an article."
   (let ((gnus-command-method (gnus-find-method-for-group group)))
     (if (not (gnus-check-backend-function
              'request-update-mark (car gnus-command-method)))
@@ -433,6 +433,10 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
   (goto-char (point-max))
   (unless (bolp)
     (insert "\n"))
+  (save-restriction
+    (message-narrow-to-headers)
+    (rfc2047-encode-message-header))
+  (message-encode-message-body)
   (let ((func (car (or gnus-command-method
                       (gnus-find-method-for-group group)))))
     (funcall (intern (format "%s-request-accept-article" func))
@@ -441,6 +445,10 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
             last)))
 
 (defun gnus-request-replace-article (article group buffer)
+  (save-restriction
+    (message-narrow-to-headers)
+    (rfc2047-encode-message-header))
+  (message-encode-message-body)
   (let ((func (car (gnus-group-name-to-method group))))
     (funcall (intern (format "%s-request-replace-article" func))
             article (gnus-group-real-name group) buffer)))