From f0716c6eb7471d03e3aafcb2d5ef330a29ba7fea Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 8 Jan 2003 04:21:49 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 26 ++++++++++++++++++ lisp/gnus-art.el | 2 +- lisp/message.el | 77 ++++++++++++++++++++++++++++-------------------------- lisp/mml.el | 8 +++--- 4 files changed, 71 insertions(+), 42 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b57af3..54ec47e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,31 @@ 2003-01-07 Reiner Steib + * message.el (message-cross-post-default) + (message-cross-post-note-function, message-shoot-gnksa-feet) + (message-strip-subject-trailing-was, message-change-subject) + (message-mark-insert-file, message-cross-post-followup-to) + (message-cross-post-followup-to, message-mode-map) + (message-generate-unsubscribed-mail-followup-to) + (message-make-mail-followup-to): Minor changes to doc-strings and + error messages. Updated copyright line. + + * message.el (message-make-mail-followup-to, + message-generate-unsubscribed-mail-followup-to): New function + names. Renamed functions: "-mft" -> "-mail-followup-to". + (message-make-mft, message-gen-unsubscribed-mft): Removed function + names. + + * mml.el (mml-preview-insert-mail-followup-to): New function name. + (mml-preview-insert-mft): Removed function name. + (mml-preview): Use new function names. + + * gnus-art.el (gnus-article-edit-mode-map): Use new function names. + + * message.el (message-mode-field-menu): Moved header related + commands from "Message" to "Field" menu. + +2003-01-07 Reiner Steib + * message.el (message-generate-headers-first): Added customization if variable is a list. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 88b1bc7..4e784ff 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5612,7 +5612,7 @@ If given a prefix, show the hidden text instead." "\C-c\C-f\C-k" message-goto-keywords "\C-c\C-f\C-u" message-goto-summary "\C-c\C-f\C-i" message-insert-or-toggle-importance - "\C-c\C-f\C-a" message-gen-unsubscribed-mft + "\C-c\C-f\C-a" message-generate-unsubscribed-mail-followup-to "\C-c\C-b" message-goto-body "\C-c\C-i" message-goto-signature diff --git a/lisp/message.el b/lisp/message.el index a4a2a2a..00402ca 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1,5 +1,5 @@ ;;; message.el --- composing mail and news messages -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -269,9 +269,9 @@ If nil, don't insert any text in the body." ;;;###autoload (defcustom message-cross-post-default t - "When non-nil `message-cross-post-followup-to' will normally perform a -crosspost. If nil, `message-cross-post-followup-to' will only do a followup. -Note that you can explicitly override this setting by calling + "When non-nil `message-cross-post-followup-to' will perform a crosspost. +If nil, `message-cross-post-followup-to' will only do a followup. Note that +you can explicitly override this setting by calling `message-cross-post-followup-to' with a prefix." :type 'boolean :group 'message-various) @@ -296,7 +296,7 @@ Note that you can explicitly override this setting by calling "Function to use to insert note about Crosspost or Followup-To. The function will be called with four arguments. The function should not only insert a note, but also ensure old notes are deleted. See the documentation -for `message-cross-post-insert-note'. " +for `message-cross-post-insert-note'." :type 'function :group 'message-various) @@ -1166,7 +1166,7 @@ A value of nil means exclude your own user name only." "*A list of GNKSA feet you are allowed to shoot. Gnus gives you all the opportunity you could possibly want for shooting yourself in the foot. Also, Gnus allows you to shoot the -feet of Good Net-Keeping Seal of Approval. The following are foot +feet of Good Net-Keeping Seal of Approval. The following are foot candidates: `empty-article' Allow you to post an empty article; `quoted-text-only' Allow you to post quoted text only; @@ -1795,7 +1795,7 @@ is used by default." ;;; Start of functions adopted from `message-utils.el'. (defun message-strip-subject-trailing-was (subject) - "Remove trailing \"(Was: )\" from subject lines. + "Remove trailing \"(Was: )\" from SUBJECT lines. Leading \"Re: \" is not stripped by this function. Use the function `message-strip-subject-re' for this." (let* ((query message-subject-trailing-was-query) @@ -1830,7 +1830,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: )." + "Ask for NEW-SUBJECT header, append (was: )." (interactive (list (read-from-minibuffer "New subject: "))) @@ -1840,7 +1840,7 @@ Leading \"Re: \" is not stripped by this function. Use the function (save-excursion (let ((old-subject (message-fetch-field "Subject"))) (cond ((not old-subject) - (error "No current subject.")) + (error "No current subject")) ((not (string-match (concat "^[ \t]*" (regexp-quote new-subject) @@ -1870,7 +1870,7 @@ See `message-mark-insert-begin' and `message-mark-insert-end'." ;;;###autoload (defun message-mark-insert-file (file) - "Inserts FILE at point, marking it with enclosing tags. + "Insert FILE at point, marking it with enclosing tags. See `message-mark-insert-begin' and `message-mark-insert-end'." (interactive "fFile to insert: ") ;; reverse insertion to get correct result. @@ -1980,7 +1980,7 @@ been made to before the user asked for a Crosspost." ;;;###autoload (defun message-cross-post-followup-to (target-group) - "Crossposts message and sets Followup-To to TARGET-GROUP. + "Crossposts message and set Followup-To to TARGET-GROUP. With prefix-argument just set Follow-Up, don't cross-post." (interactive (list ; Completion based on Gnus @@ -2000,7 +2000,7 @@ With prefix-argument just set Follow-Up, don't cross-post." (or old-groups "")))) ;; check whether target exactly matches old Newsgroups (cond ((not old-groups) - (error "No current newsgroup.")) + (error "No current newsgroup")) ((or (not in-old) (not (string-match (concat "^[ \t]*" @@ -2228,8 +2228,10 @@ Point is left at the beginning of the narrowed-to region." (define-key message-mode-map "\C-c\C-f\C-m" 'message-goto-mail-followup-to) (define-key message-mode-map "\C-c\C-f\C-k" 'message-goto-keywords) (define-key message-mode-map "\C-c\C-f\C-u" 'message-goto-summary) - (define-key message-mode-map "\C-c\C-f\C-i" 'message-insert-or-toggle-importance) - (define-key message-mode-map "\C-c\C-f\C-a" 'message-gen-unsubscribed-mft) + (define-key message-mode-map "\C-c\C-f\C-i" + 'message-insert-or-toggle-importance) + (define-key message-mode-map "\C-c\C-f\C-a" + 'message-generate-unsubscribed-mail-followup-to) ;; modify headers (and insert notes in body) (define-key message-mode-map "\C-c\C-fs" 'message-change-subject) @@ -2252,7 +2254,8 @@ Point is left at the beginning of the narrowed-to region." (define-key message-mode-map "\C-c\C-l" 'message-to-list-only) (define-key message-mode-map "\C-c\C-u" 'message-insert-or-toggle-importance) - (define-key message-mode-map "\C-c\M-n" 'message-insert-disposition-notification-to) + (define-key message-mode-map "\C-c\M-n" + 'message-insert-disposition-notification-to) (define-key message-mode-map "\C-c\C-y" 'message-yank-original) (define-key message-mode-map "\C-c\M-\C-y" 'message-yank-buffer) @@ -2284,7 +2287,6 @@ Point is left at the beginning of the narrowed-to region." (easy-menu-define message-mode-menu message-mode-map "Message Menu." `("Message" - ["Sort Headers" message-sort-headers t] ["Yank Original" message-yank-original t] ["Fill Yanked Message" message-fill-yanked-message t] ["Insert Signature" message-insert-signature t] @@ -2295,16 +2297,6 @@ Point is left at the beginning of the narrowed-to region." ["Kill To Signature" message-kill-to-signature t] ["Newline and Reformat" message-newline-and-reformat t] ["Rename buffer" message-rename-buffer t] - ["Flag As Important" message-insert-importance-high - ,@(if (featurep 'xemacs) '(t) - '(:help "Mark this message as important"))] - ["Flag As Unimportant" message-insert-importance-low - ,@(if (featurep 'xemacs) '(t) - '(:help "Mark this message as unimportant"))] - ["Request Receipt" - message-insert-disposition-notification-to - ,@(if (featurep 'xemacs) '(t) - '(:help "Request a receipt notification"))] ["Spellcheck" ispell-message ,@(if (featurep 'xemacs) '(t) '(:help "Spellcheck this message"))] @@ -2346,6 +2338,16 @@ Point is left at the beginning of the narrowed-to region." ["Bcc" message-goto-bcc t] ["Fcc" message-goto-fcc t] ["Reply-To" message-goto-reply-to t] + ["Flag As Important" message-insert-importance-high + ,@(if (featurep 'xemacs) '(t) + '(:help "Mark this message as important"))] + ["Flag As Unimportant" message-insert-importance-low + ,@(if (featurep 'xemacs) '(t) + '(:help "Mark this message as unimportant"))] + ["Request Receipt" + message-insert-disposition-notification-to + ,@(if (featurep 'xemacs) '(t) + '(:help "Request a receipt notification"))] "----" ;; (typical) news stuff ["Summary" message-goto-summary t] @@ -2364,8 +2366,9 @@ Point is left at the beginning of the narrowed-to region." ["Mail-Copies-To" message-goto-mail-copies-to t] ["Reduce To: to Cc:" message-reduce-to-to-cc t] "----" - ["Body" message-goto-body t] - ["Signature" message-goto-signature t])) + ["Sort Headers" message-sort-headers t] + ["Goto Body" message-goto-body t] + ["Goto Signature" message-goto-signature t])) (defvar message-tool-bar-map nil) @@ -2685,15 +2688,15 @@ return nil." (goto-char (point-max)) nil)) -(defun message-gen-unsubscribed-mft (&optional include-cc) +(defun message-generate-unsubscribed-mail-followup-to (&optional include-cc) "Insert a reasonable MFT header in a post to an unsubscribed list. When making original posts to a mailing list you are not subscribed to, you have to type in a MFT header by hand. The contents, usually, are the addresses of the list and your own address. This function inserts such a header automatically. It fetches the contents of the To: header -in the current mail buffer, and appends the current user-mail-address. +in the current mail buffer, and appends the current `user-mail-address'. -If the optional argument `include-cc' is non-nil, the addresses in the +If the optional argument INCLUDE-CC is non-nil, the addresses in the Cc: header are also put into the MFT." (interactive "P") @@ -3888,7 +3891,7 @@ This sub function is for exclusive use of `message-send-mail'." (not (mail-fetch-field "mail-followup-to"))) (setq headers (cons - (cons "Mail-Followup-To" (message-make-mft)) + (cons "Mail-Followup-To" (message-make-mail-followup-to)) message-required-mail-headers)) ;; otherwise, delete the MFT header if the field is empty (when (equal "" (mail-fetch-field "mail-followup-to")) @@ -5089,7 +5092,7 @@ give as trustworthy answer as possible." "Send a message to the list only. Remove all addresses but the list address from To and Cc headers." (interactive) - (let ((listaddr (message-make-mft t))) + (let ((listaddr (message-make-mail-followup-to t))) (when listaddr (save-excursion (message-remove-header "to") @@ -5097,10 +5100,10 @@ Remove all addresses but the list address from To and Cc headers." (message-position-on-field "To" "X-Draft-From") (insert listaddr))))) -(defun message-make-mft (&optional only-show-subscribed) - "Return the Mail-Followup-To header. If passed the optional -argument `only-show-subscribed' only return the subscribed address (and -not the additional To and Cc header contents)." +(defun message-make-mail-followup-to (&optional only-show-subscribed) + "Return the Mail-Followup-To header. +If passed the optional argument ONLY-SHOW-SUBSCRIBED only return the +subscribed address (and not the additional To and Cc header contents)." (let* ((case-fold-search t) (to (message-fetch-field "To")) (cc (message-fetch-field "cc")) diff --git a/lisp/mml.el b/lisp/mml.el index 97ed2c7..ff3f98e 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -1009,15 +1009,15 @@ TYPE is the MIME type to use." (mml-insert-tag 'part 'type type 'disposition "inline") (forward-line -1)) -(defun mml-preview-insert-mft () +(defun mml-preview-insert-mail-followup-to () "Insert a Mail-Followup-To header before previewing an article. Should be adopted if code in `message-send-mail' is changed." (when (and (message-mail-p) (message-subscribed-p) (not (mail-fetch-field "mail-followup-to")) - (message-make-mft)) + (message-make-mail-followup-to)) (message-position-on-field "Mail-Followup-To" "X-Draft-From") - (insert (message-make-mft)))) + (insert (message-make-mail-followup-to)))) (defun mml-preview (&optional raw) "Display current buffer with Gnus, in a new buffer. @@ -1039,7 +1039,7 @@ If RAW, don't highlight the article." "*MIME preview of ") (buffer-name)))) (erase-buffer) (insert-buffer buf) - (mml-preview-insert-mft) + (mml-preview-insert-mail-followup-to) (let ((message-deletable-headers (if (message-news-p) nil message-deletable-headers))) -- 1.7.10.4