From: yamaoka Date: Sun, 24 Jan 1999 23:48:56 +0000 (+0000) Subject: * (gnus-inews-yank-articles): Use `message-list-references' for gathering IDs X-Git-Tag: pgnus-ichikawa-199901251900~5 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=56a50998f50f7012451921fde34e1d3ae5ced65c;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 0af33a3..c4bf6bf 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -352,10 +352,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 @@ -367,11 +367,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) @@ -382,17 +381,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) @@ -404,7 +394,7 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (list (or (assq 'References message-header-format-alist) '(References . message-shorten-references))) (list (cons 'References - (mapconcat 'identity references " ")))) + (mapconcat 'identity (nreverse refs) " ")))) (backward-delete-char 1)) (setq beg (mark t)) (pop-mark))