;;; 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>
: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)
"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
(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)
(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))
;;;###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."
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)
(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)
`(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
(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
(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)))))
(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
(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)