From 7990c16a759f514c521aa715005a318d965e71ac Mon Sep 17 00:00:00 2001 From: keiichi Date: Mon, 25 Jan 1999 03:28:36 +0000 Subject: [PATCH] Sync up with gnus-6_10. --- lisp/gnus-msg.el | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index c37bcc0..3ff6494 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -6,6 +6,7 @@ ;; MORIOKA Tomohiko ;; Shuhei KOBAYASHI ;; Katsumi Yamaoka +;; Kiyokazu SUTO ;; Keywords: mail, news, MIME ;; This file is part of GNU Emacs. @@ -308,13 +309,26 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (gnus-summary-followup (gnus-summary-work-articles arg) t)) (defun gnus-inews-yank-articles (articles) - (let (beg article) + (let* ((more-than-one (cdr articles)) + (frame (when (and message-use-multi-frames more-than-one) + (window-frame (get-buffer-window (current-buffer))))) + refs beg article) (message-goto-body) (while (setq article (pop articles)) (save-window-excursion (set-buffer gnus-summary-buffer) (gnus-summary-select-article nil nil nil article) (gnus-summary-remove-process-mark article)) + (when frame + (select-frame frame)) + + ;; Gathering references. + (when more-than-one + (setq refs (message-list-references + refs + (mail-header-references gnus-current-headers) + (mail-header-message-id gnus-current-headers)))) + (gnus-copy-article-buffer) (let ((message-reply-buffer gnus-article-copy) (message-reply-headers gnus-current-headers)) @@ -323,6 +337,25 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (when articles (insert "\n"))) (push-mark) + + ;; Replace with the gathered references. + (when refs + (push-mark beg) + (save-restriction + (message-narrow-to-headers) + (let ((case-fold-search t)) + (if (re-search-forward "^References:\\([\t ]+.+\n\\)+" nil t) + (replace-match "") + (goto-char (point-max)))) + (mail-header-format + (list (or (assq 'References message-header-format-alist) + '(References . message-fill-references))) + (list (cons 'References + (mapconcat 'identity (nreverse refs) " ")))) + (backward-delete-char 1)) + (setq beg (mark t)) + (pop-mark)) + (goto-char beg))) (defun gnus-summary-cancel-article (&optional n symp) @@ -685,7 +718,7 @@ If FULL-HEADERS (the prefix), include full headers when forwarding." "Digest and forwards all articles in this series to a newsgroup." (interactive "P") (gnus-summary-mail-digest n t)) - + (defun gnus-summary-resend-message (address n) "Resend the current article to ADDRESS." (interactive "sResend message(s) to: \nP") -- 1.7.10.4