Importing pgnus-0.79
[elisp/gnus.git-] / lisp / nndraft.el
index 1c10613..662fb09 100644 (file)
@@ -1,5 +1,5 @@
 ;;; nndraft.el --- draft article access for Gnus
-;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
           (newest (if (file-newer-than-file-p file auto) file auto))
           (nntp-server-buffer (or buffer nntp-server-buffer)))
       (when (and (file-exists-p newest)
-                (nnmail-find-file newest))
+                (let ((nnmail-file-coding-system
+                       message-draft-coding-system))
+                  (nnmail-find-file newest)))
        (save-excursion
          (set-buffer nntp-server-buffer)
          (goto-char (point-min))
        (buf (current-buffer))
         article file)
     (with-temp-buffer
-      (insert-buffer buf)
+      (insert-buffer-substring buf)
       (setq article (nndraft-request-accept-article
                     group (nnoo-current-server 'nndraft) t 'noinsert)
            file (nndraft-article-filename article)))
     (clear-visited-file-modtime)
     article))
 
-(defun nndraft-save-mime-part (file part)
-  "Save MIME PART belonging to the FILE."
-  (write-region (point-min) (point-max)
-               (format "%s.%d" file part)))
-
-(defun nndraft-get-mime-part (file part)
-  "Save MIME PART belonging to the FILE."
-  (insert-file-contents (format "%s.%d" file part)))
-
 (deffoo nndraft-request-expire-articles (articles group &optional server force)
   (nndraft-possibly-change-group group)
   (let* ((nnmh-allow-delete-final t)
    nnmh-retrieve-headers
    nnmh-request-group
    nnmh-close-group
-   nnmh-request-list 
+   nnmh-request-list
    nnmh-request-newsgroups
    nnmh-request-move-article
    nnmh-request-replace-article))