(message-reply): Take an optional switch-buffer parameter so that Gnus window confs...
[gnus] / lisp / gnus-msg.el
index d77abfa..b199dcc 100644 (file)
@@ -1,7 +1,6 @@
 ;;; gnus-msg.el --- mail and post interface for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2011  Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -243,10 +242,10 @@ See also the `mml-default-sign-method' variable."
   :group 'gnus-message
   :type 'boolean)
 
-(defcustom gnus-message-replyencrypt
-  nil
+(defcustom gnus-message-replyencrypt t
   "Automatically encrypt replies to encrypted messages.
 See also the `mml-default-encrypt-method' variable."
+  :version "24.1"
   :group 'gnus-message
   :type 'boolean)
 
@@ -476,7 +475,7 @@ Thank you for your help in stamping out bugs.
 
 ;;;###autoload
 (defun gnus-msg-mail (&optional to subject other-headers continue
-                               switch-action yank-action send-actions)
+                     switch-action yank-action send-actions return-action)
   "Start editing a mail message to be sent.
 Like `message-mail', but with Gnus paraphernalia, particularly the
 Gcc: header for archiving purposes."
@@ -485,7 +484,7 @@ Gcc: header for archiving purposes."
        mail-buf)
     (gnus-setup-message 'message
       (message-mail to subject other-headers continue
-                   nil yank-action send-actions))
+                   nil yank-action send-actions return-action))
     (when switch-action
       (setq mail-buf (current-buffer))
       (switch-to-buffer buf)
@@ -1082,14 +1081,14 @@ If VERY-WIDE, make a very wide reply."
              (gnus-summary-work-articles 1))))
   ;; Allow user to require confirmation before replying by mail to the
   ;; author of a news article (or mail message).
-  (when (or
-           (not (or (gnus-news-group-p gnus-newsgroup-name)
+  (when (or (not (or (gnus-news-group-p gnus-newsgroup-name)
                     gnus-confirm-treat-mail-like-news))
            (not (cond ((stringp gnus-confirm-mail-reply-to-news)
                        (string-match gnus-confirm-mail-reply-to-news
                                      gnus-newsgroup-name))
                       ((functionp gnus-confirm-mail-reply-to-news)
-                       (funcall gnus-confirm-mail-reply-to-news gnus-newsgroup-name))
+                       (funcall gnus-confirm-mail-reply-to-news
+                                gnus-newsgroup-name))
                       (t gnus-confirm-mail-reply-to-news)))
            (if (or wide very-wide)
                t ;; Ignore gnus-confirm-mail-reply-to-news for wide and very
@@ -1124,7 +1123,7 @@ If VERY-WIDE, make a very wide reply."
            (insert headers))
          (goto-char (point-max)))
        (mml-quote-region (point) (point-max))
-       (message-reply nil wide)
+       (message-reply nil wide 'switch-to-buffer)
        (when yank
          (gnus-inews-yank-articles yank))
        (gnus-summary-handle-replysign)))))