From: yamaoka Date: Fri, 22 Jan 1999 05:34:36 +0000 (+0000) Subject: * (gnus-inews-yank-articles): Fetch IDs from `gnus-current-headers' instead of X-Git-Tag: pgnus-ichikawa-199901221900~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=05b270a99e73d580ca1b51dbc79b41a7a22cea97;p=elisp%2Fgnus.git- * (gnus-inews-yank-articles): Fetch IDs from `gnus-current-headers' instead of article header. --- diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index a5080e2..0af33a3 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -355,8 +355,7 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (let* ((more-than-one (> (length articles) 1)) (frame (when (and message-use-multi-frames more-than-one) (window-frame (get-buffer-window (current-buffer))))) - (refs "") - beg article references) + refs beg article references) (message-goto-body) (while (setq article (pop articles)) (save-window-excursion @@ -368,16 +367,13 @@ If prefix argument YANK is non-nil, original article is yanked automatically." ;; Gathering references. (when more-than-one - (save-current-buffer - (set-buffer (gnus-copy-article-buffer)) - (save-restriction - (message-narrow-to-head) - (setq refs (concat refs - (or (message-fetch-field "references") "") - " " - (or (message-fetch-field "message-id") "") - " "))))) + (setq refs + (append + refs + (split-string (mail-header-references gnus-current-headers)) + (list (mail-header-message-id gnus-current-headers))))) + (gnus-copy-article-buffer) (let ((message-reply-buffer gnus-article-copy) (message-reply-headers gnus-current-headers)) (message-yank-original) @@ -387,13 +383,13 @@ If prefix argument YANK is non-nil, original article is yanked automatically." (push-mark) ;; Eliminate duplicated references. - (unless (string-match "^ *$" refs) + (when refs (mapcar (lambda (ref) (or (zerop (length ref)) (member ref references) (setq references (append references (list ref))))) - (split-string refs))) + refs)) ;; Replace with the gathered references. (when references