* dgnushack.el: Autoload sha1 on XEmacs.
[gnus] / lisp / gnus-msg.el
index 08fef23..8e382e0 100644 (file)
@@ -351,6 +351,7 @@ Thank you for your help in stamping out bugs.
   "r" gnus-summary-reply
   "y" gnus-summary-yank-message
   "R" gnus-summary-reply-with-original
+  "L" gnus-summary-reply-to-list-with-original
   "w" gnus-summary-wide-reply
   "W" gnus-summary-wide-reply-with-original
   "v" gnus-summary-very-wide-reply
@@ -383,11 +384,13 @@ Thank you for your help in stamping out bugs.
 (defvar gnus-article-reply nil)
 (defmacro gnus-setup-message (config &rest forms)
   (let ((winconf (make-symbol "gnus-setup-message-winconf"))
+       (winconf-name (make-symbol "gnus-setup-message-winconf-name"))
        (buffer (make-symbol "gnus-setup-message-buffer"))
        (article (make-symbol "gnus-setup-message-article"))
        (yanked (make-symbol "gnus-setup-yanked-articles"))
        (group (make-symbol "gnus-setup-message-group")))
     `(let ((,winconf (current-window-configuration))
+          (,winconf-name gnus-current-window-configuration)
           (,buffer (buffer-name (current-buffer)))
           (,article gnus-article-reply)
           (,yanked gnus-article-yanked-articles)
@@ -432,7 +435,7 @@ Thank you for your help in stamping out bugs.
           (progn
             ,@forms)
         (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config
-                                     ,yanked)
+                                     ,yanked ',winconf-name)
         (setq gnus-message-buffer (current-buffer))
         (set (make-local-variable 'gnus-message-group-art)
              (cons ,group ,article))
@@ -527,7 +530,8 @@ Gcc: header for archiving purposes."
            (throw 'found (cons (cadr elem) (caddr elem)))))))))
 
 (defun gnus-inews-add-send-actions (winconf buffer article
-                                           &optional config yanked)
+                                           &optional config yanked
+                                           winconf-name)
   (gnus-make-local-hook 'message-sent-hook)
   (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
                                 'gnus-inews-do-gcc) nil t)
@@ -538,8 +542,10 @@ Gcc: header for archiving purposes."
        `(lambda (&optional arg)
           (gnus-post-method arg ,gnus-newsgroup-name)))
   (message-add-action
-   `(when (gnus-buffer-exists-p ,buffer)
-      (set-window-configuration ,winconf))
+   `(progn
+      (setq gnus-current-window-configuration ',winconf-name)
+      (when (gnus-buffer-exists-p ,buffer)
+       (set-window-configuration ,winconf)))
    'exit 'postpone 'kill)
   (let ((to-be-marked (cond
                       (yanked
@@ -1081,14 +1087,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
@@ -1123,7 +1129,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)))))
@@ -1149,6 +1155,16 @@ The original article will be yanked."
   (interactive "P")
   (gnus-summary-reply (gnus-summary-work-articles n) wide))
 
+(defun gnus-summary-reply-to-list-with-original (n &optional wide)
+  "Start composing a reply mail to the current message.
+The reply goes only to the mailing list.
+The original article will be yanked."
+  (interactive "P")
+  (let ((message-reply-to-function
+        (lambda nil
+          `((To . ,(gnus-mailing-list-followup-to))))))
+    (gnus-summary-reply (gnus-summary-work-articles n) wide)))
+
 (defun gnus-summary-reply-broken-reply-to (&optional yank wide very-wide)
   "Like `gnus-summary-reply' except removing reply-to field.
 If prefix argument YANK is non-nil, the original article is yanked
@@ -1445,6 +1461,8 @@ If YANK is non-nil, include the original article."
     (goto-char (point-min))
     (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
     (forward-line 1)
+    (insert (format "Package: %s\n" gnus-bug-package))
+    (insert (format "Version: %s\n" (gnus-continuum-version)))
     (insert (gnus-version) "\n"
            (emacs-version) "\n")
     (when (and (boundp 'nntp-server-type)