From bafc3998abcdbf5d1688ba35327d1aa67a8bdbab Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 30 Oct 2001 11:25:19 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 22 +++++++++++++++++++ lisp/gnus-art.el | 8 +++---- lisp/gnus-msg.el | 1 + lisp/lpath.el | 3 +++ lisp/message.el | 62 +++++++++++++++++++++++++++++++++------------------- lisp/mm-extern.el | 2 ++ lisp/mm-partial.el | 2 ++ 7 files changed, 73 insertions(+), 27 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39d9216..32193e7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,25 @@ +2001-10-30 04:00:00 ShengHuo ZHU + + * gnus-art.el (article-decode-group-name): Use nnmail-fetch-field + instead. + + * message.el (message-forward-subject-author-subject): Don't use + message-news-p, which widens the buffer. + (message-forward-make-body): New function. + (message-forward): Use it. + (message-insinuate-rmail): New. + (message-forward-rmail-make-body): New. + +2001-10-30 02:00:00 ShengHuo ZHU + + * mm-extern.el (mm-extern): Provide it. + + * mm-partial.el (mm-partial): Provide it. + +2001-10-28 16:00:00 ShengHuo ZHU + + * gnus-msg.el (gnus-setup-message): Call post-command-hook. + 2001-10-29 Simon Josefsson * mml.el (mml-preview): Bind message-this-is-news if it is diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index cde3bca..1a6c660 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1919,19 +1919,19 @@ If PROMPT (the prefix), prompt for a coding system to use." (when (and (or gnus-group-name-charset-method-alist gnus-group-name-charset-group-alist) (gnus-buffer-live-p gnus-original-article-buffer)) - (when (mail-fetch-field "Newsgroups") + (when (nnmail-fetch-field "Newsgroups") (nnheader-replace-header "Newsgroups" (gnus-decode-newsgroups (with-current-buffer gnus-original-article-buffer - (mail-fetch-field "Newsgroups")) + (nnmail-fetch-field "Newsgroups")) gnus-newsgroup-name method))) - (when (mail-fetch-field "Followup-To") + (when (nnmail-fetch-field "Followup-To") (nnheader-replace-header "Followup-To" (gnus-decode-newsgroups (with-current-buffer gnus-original-article-buffer - (mail-fetch-field "Followup-To")) + (nnmail-fetch-field "Followup-To")) gnus-newsgroup-name method)))))) (defun article-de-quoted-unreadable (&optional force read-charset) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 9c8c54c..7a26243 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -295,6 +295,7 @@ Thank you for your help in stamping out bugs. (gnus-run-hooks 'gnus-message-setup-hook)) (gnus-add-buffer) (gnus-configure-windows ,config t) + (run-hooks 'post-command-hook) (set-buffer-modified-p nil)))) (defun gnus-inews-insert-draft-meta-information (group article) diff --git a/lisp/lpath.el b/lisp/lpath.el index 1f7e589..2b87d7f 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -28,6 +28,7 @@ propertize make-mode-line-mouse2-map make-mode-line-mouse-map rmail-select-summary rmail-summary-exists rmail-update-summary + rmail-toggle-header sc-cite-regexp set-font-family set-font-size temp-directory string-as-multibyte tool-bar-add-item tool-bar-add-item-from-menu @@ -48,6 +49,8 @@ url-current-callback-func url-be-asynchronous url-current-callback-data url-working-buffer url-current-mime-headers w3-meta-charset-content-type-regexp + rmail-enable-mime-composing + rmail-insert-mime-forwarded-message-function w3-meta-content-type-charset-regexp)) (if (featurep 'xemacs) diff --git a/lisp/message.el b/lisp/message.el index 4279819..47359a5 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -5288,13 +5288,11 @@ The form is: [Source] Subject, where if the original message was mail, Source is the sender, and if the original message was news, Source is the list of newsgroups is was posted to." (concat "[" - (if (message-news-p) - (or (message-fetch-field "newsgroups") - "(nowhere)") - (let ((from (message-fetch-field "from"))) - (if from - (nnheader-decode-from from) - "(nobody)"))) + (let ((prefix (message-fetch-field "newsgroups"))) + (or prefix + (and (setq prefix (message-fetch-field "from")) + (nnheader-decode-from prefix)) + "(nowhere)")) "] " subject)) (defun message-forward-subject-fwd (subject) @@ -5336,25 +5334,28 @@ the message." Optional NEWS will use news to forward instead of mail." (interactive "P") (let ((cur (current-buffer)) - (subject (message-make-forward-subject)) - art-beg) + (subject (message-make-forward-subject))) (if news (message-news nil subject) (message-mail nil subject)) - ;; Put point where we want it before inserting the forwarded - ;; message. - (if message-forward-before-signature - (message-goto-body) - (goto-char (point-max))) - ;; Make sure we're at the start of the line. - (unless (bolp) - (insert "\n")) - ;; Narrow to the area we are to insert. - (narrow-to-region (point) (point)) - ;; Insert the separators and the forwarded buffer. - (insert message-forward-start-separator) - (setq art-beg (point)) - (insert-buffer-substring cur) + (message-forward-make-body cur))) + +;;;###autoload +(defun message-forward-make-body (forward-buffer) + ;; Put point where we want it before inserting the forwarded + ;; message. + (if message-forward-before-signature + (message-goto-body) + (goto-char (point-max))) + ;; Make sure we're at the start of the line. + (unless (bolp) + (insert "\n")) + ;; Narrow to the area we are to insert. + (narrow-to-region (point) (point)) + ;; Insert the separators and the forwarded buffer. + (insert message-forward-start-separator) + (let ((art-beg (point))) + (insert-buffer-substring forward-buffer) (goto-char (point-max)) (insert message-forward-end-separator) (set-text-properties (point-min) (point-max) nil) @@ -5369,6 +5370,21 @@ Optional NEWS will use news to forward instead of mail." (message-position-point))) ;;;###autoload +(defun message-forward-rmail-make-body (forward-buffer) + (with-current-buffer forward-buffer + (let (rmail-enable-mime) + (rmail-toggle-header 0))) + (message-forward-make-body forward-buffer)) + +;;;###autoload +(defun message-insinuate-rmail () + "Let RMAIL uses message to forward." + (interactive) + (setq rmail-enable-mime-composing t) + (setq rmail-insert-mime-forwarded-message-function + 'message-forward-rmail-make-body)) + +;;;###autoload (defun message-resend (address) "Resend the current article to ADDRESS." (interactive diff --git a/lisp/mm-extern.el b/lisp/mm-extern.el index 4a18d0e..5ccd2e1 100644 --- a/lisp/mm-extern.el +++ b/lisp/mm-extern.el @@ -163,4 +163,6 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (error nil)) (delete-region ,(point-min-marker) ,(point-max-marker)))))))))) +(provide 'mm-extern) + ;;; mm-extern.el ends here diff --git a/lisp/mm-partial.el b/lisp/mm-partial.el index d3346ba..12fe97b 100644 --- a/lisp/mm-partial.el +++ b/lisp/mm-partial.el @@ -148,4 +148,6 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (error nil)) (delete-region ,(point-min-marker) ,(point-max-marker)))))))))) +(provide 'mm-partial) + ;;; mm-partial.el ends here -- 1.7.10.4