* gnus.el: Update all the copyright notices.
[gnus] / lisp / gnus-draft.el
index ab74806..35294eb 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-draft.el --- draft message support for Gnus
-;; Copyright (C) 1997,98 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2000 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
   (interactive "P")
   (when (eq major-mode 'gnus-summary-mode)
     (when (set (make-local-variable 'gnus-draft-mode)
-                 (if (null arg) (not gnus-draft-mode)
-                   (> (prefix-numeric-value arg) 0)))
+              (if (null arg) (not gnus-draft-mode)
+                (> (prefix-numeric-value arg) 0)))
       ;; Set up the menu.
       (when (gnus-visual-p 'draft-menu 'menu)
        (gnus-draft-make-menu-bar))
       (gnus-add-minor-mode 'gnus-draft-mode " Draft" gnus-draft-mode-map)
+      (mml-mode)
       (gnus-run-hooks 'gnus-draft-mode-hook))))
 
 ;;; Commands
   (gnus-draft-setup article (or group "nndraft:queue"))
   (let ((message-syntax-checks (if interactive nil
                                 'dont-check-for-anything-just-trust-me))
-       message-send-hook type method)
+       (message-inhibit-body-encoding (or (not group) 
+                                          (equal group "nndraft:queue")
+                                          message-inhibit-body-encoding))
+       (message-send-hook (and group (not (equal group "nndraft:queue"))
+                               message-send-hook))
+       (message-setup-hook nil)
+       type method)
     ;; We read the meta-information that says how and where
     ;; this message is to be sent.
     (save-restriction
 ;;;!!!but for the time being, we'll just run this tiny function uncompiled.
 
 (progn
-(defun gnus-draft-setup (narticle group)
-  (gnus-setup-message 'forward
-    (let ((article narticle))
-      (message-mail)
-      (erase-buffer)
-      (if (not (gnus-request-restore-buffer article group))
-         (error "Couldn't restore the article")
-       ;; Insert the separator.
-       (goto-char (point-min))
-       (search-forward "\n\n")
-       (forward-char -1)
-       (insert mail-header-separator)
-       (forward-line 1)
-       (message-set-auto-save-file-name))))))
+  (defun gnus-draft-setup (narticle group)
+    (gnus-setup-message 'forward
+      (let ((article narticle))
+       (message-mail)
+       (erase-buffer)
+       (if (not (gnus-request-restore-buffer article group))
+           (error "Couldn't restore the article")
+         ;; Insert the separator.
+         (if (equal group "nndraft:queue")
+             (mime-to-mml))
+         (goto-char (point-min))
+         (search-forward "\n\n")
+         (forward-char -1)
+         (insert mail-header-separator)
+         (forward-line 1)
+         (message-set-auto-save-file-name))))))
 
 (defun gnus-draft-article-sendable-p (article)
   "Say whether ARTICLE is sendable."