From: yamaoka Date: Sun, 24 Jan 1999 23:47:37 +0000 (+0000) Subject: * (gnus-inews-yank-articles): Use `message-list-references' for gathering IDs X-Git-Tag: gnus-6_10-199901251900~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cf4580920924c468a63b9d841e9a53e3a2eae6f;p=elisp%2Fgnus.git- * (gnus-inews-yank-articles): Use `message-list-references' for gathering IDs from yanked articles. --- diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 47423a5..a4d0609 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -308,10 +308,10 @@ 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* ((more-than-one (> (length articles) 1)) + (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 references) + refs beg article) (message-goto-body) (while (setq article (pop articles)) (save-window-excursion @@ -323,11 +323,10 @@ If prefix argument YANK is non-nil, original article is yanked automatically." ;; Gathering references. (when more-than-one - (setq refs - (append - refs - (split-string (mail-header-references gnus-current-headers)) - (list (mail-header-message-id gnus-current-headers))))) + (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) @@ -338,17 +337,8 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (insert "\n"))) (push-mark) - ;; Eliminate duplicated references. - (when refs - (mapcar - (lambda (ref) - (or (zerop (length ref)) - (member ref references) - (setq references (append references (list ref))))) - refs)) - ;; Replace with the gathered references. - (when references + (when refs (push-mark beg) (save-restriction (message-narrow-to-headers) @@ -360,7 +350,7 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (list (or (assq 'References message-header-format-alist) '(References . message-fill-references))) (list (cons 'References - (mapconcat 'identity references " ")))) + (mapconcat 'identity (nreverse refs) " ")))) (backward-delete-char 1)) (setq beg (mark t)) (pop-mark))