Go back to grave quoting in source-code docstrings etc.
[gnus] / lisp / gnus-draft.el
index b613b6e..aebf118 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-draft.el --- draft message support for Gnus
 
-;; Copyright (C) 1997-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2015 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -149,7 +149,7 @@ Obeys the standard process/prefix convention."
                                      gnus-agent-queue-mail))
         (rfc2047-encode-encoded-words nil)
          type method move-to)
-    (gnus-draft-setup article (or group "nndraft:queue"))
+    (gnus-draft-setup article (or group "nndraft:queue") nil 'dont-pop)
     ;; We read the meta-information that says how and where
     ;; this message is to be sent.
     (save-restriction
@@ -245,11 +245,15 @@ Obeys the standard process/prefix convention."
   :type 'hook)
 
 
-(defun gnus-draft-setup (narticle group &optional restore)
+(defun gnus-draft-setup (narticle group &optional restore dont-pop)
+  "Setup a mail draft buffer.
+If DONT-POP is nil, display the buffer after setting it up."
   (let (ga)
     (gnus-setup-message 'forward
       (let ((article narticle))
-        (message-mail)
+        (message-mail nil nil nil nil
+                      (if dont-pop
+                          (lambda (buf) (set-buffer (get-buffer-create buf)))))
         (let ((inhibit-read-only t))
           (erase-buffer))
         (if (not (gnus-request-restore-buffer article group))
@@ -323,8 +327,7 @@ Obeys the standard process/prefix convention."
 (defun gnus-draft-clear-marks ()
   (setq gnus-newsgroup-reads nil
        gnus-newsgroup-marked nil
-       gnus-newsgroup-unreads
-       (gnus-uncompress-range (gnus-active gnus-newsgroup-name))))
+       gnus-newsgroup-unreads (nndraft-articles)))
 
 (provide 'gnus-draft)