From d596acda12b2f1457c2d253c8e05df01a9a8a353 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 10 Nov 2003 22:06:25 +0000 Subject: [PATCH] Synch to Gnus 200311102021. --- lisp/ChangeLog | 9 +++++++++ lisp/message.el | 50 ++++++++++++++++++++++++++++---------------------- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12a5464..ab367c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2003-11-10 Reiner Steib + + * message.el (message-insert-to): Do error out when the user + requested no Cc. Don't insert empty To. Can be added to + `message-setup-hook' now. From Sam Steingold . + (message-mode-field-menu): Moved some entries, added + `message-insert-wide-reply'. + (message-change-subject): Fixed comment. + 2003-11-10 Simon Josefsson * pgg-def.el (pgg-encrypt-for-me): Change default from nil to t. diff --git a/lisp/message.el b/lisp/message.el index f0a21dc..fed132e 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1915,10 +1915,7 @@ Leading \"Re: \" is not stripped by this function. Use the function ;;;###autoload (defun message-change-subject (new-subject) "Ask for NEW-SUBJECT header, append (was: )." - ;; - ;; - ;; But not mentioned in... - ;; + ;; (interactive (list (read-from-minibuffer "New subject: "))) @@ -2433,9 +2430,6 @@ Point is left at the beginning of the narrowed-to region." (easy-menu-define message-mode-field-menu message-mode-map "" `("Field" - ["Fetch To" message-insert-to t] - ["Fetch Newsgroups" message-insert-newsgroups t] - "----" ["To" message-goto-to t] ["From" message-goto-from t] ["Subject" message-goto-subject t] @@ -2459,6 +2453,7 @@ Point is left at the beginning of the narrowed-to region." ["Summary" message-goto-summary t] ["Keywords" message-goto-keywords t] ["Newsgroups" message-goto-newsgroups t] + ["Fetch Newsgroups" message-insert-newsgroups t] ["Followup-To" message-goto-followup-to t] ;; ["Followup-To (with note in body)" message-cross-post-followup-to t] ["Crosspost / Followup-To..." message-cross-post-followup-to t] @@ -2466,6 +2461,14 @@ Point is left at the beginning of the narrowed-to region." ["X-No-Archive:" message-add-archive-header t ] "----" ;; (typical) mailing-lists stuff + ["Fetch To" message-insert-to + ,@(if (featurep 'xemacs) '(t) + '(:help "Insert a To header that points to the author."))] + ["Fetch To and Cc" message-insert-wide-reply + ,@(if (featurep 'xemacs) '(t) + '(:help + "Insert To and Cc headers as if you were doing a wide reply."))] + "----" ["Send to list only" message-to-list-only t] ["Mail-Followup-To" message-goto-mail-followup-to t] ["Mail-Reply-To" message-goto-mail-reply-to t] @@ -2834,22 +2837,25 @@ Cc: header are also put into the MFT." (defun message-insert-to (&optional force) "Insert a To header that points to the author of the article being replied to. -If the original author requested not to be sent mail, the function signals -an error. -With the prefix argument FORCE, insert the header anyway." +If the original author requested not to be sent mail, don't insert unless the +prefix FORCE is given." (interactive "P") - (let ((co (message-fetch-reply-field "mail-copies-to"))) - (when (and (null force) - co - (or (equal (downcase co) "never") - (equal (downcase co) "nobody"))) - (error "The user has requested not to have copies sent via mail"))) - (message-carefully-insert-headers - (list (cons 'To - (or (message-fetch-reply-field "mail-reply-to") - (message-fetch-reply-field "reply-to") - (message-fetch-reply-field "from") - ""))))) + (let* ((mct (message-fetch-reply-field "mail-copies-to")) + (dont (and mct (or (equal (downcase mct) "never") + (equal (downcase mct) "nobody")))) + (to (or (message-fetch-reply-field "mail-reply-to") + (message-fetch-reply-field "reply-to") + (message-fetch-reply-field "from")))) + (when (and dont to) + (gnus-message + 3 + (if force + "Ignoring the user request not to have copies sent via mail" + "Complying with the user request not to have copies sent via mail"))) + (when (and force (not to)) + (error "No mail address in the article")) + (when (and to (or force (not dont))) + (message-carefully-insert-headers (list (cons 'To to)))))) (defun message-insert-wide-reply () "Insert To and Cc headers as if you were doing a wide reply." -- 1.7.10.4