From: keiichi Date: Wed, 10 May 2000 07:03:32 +0000 (+0000) Subject: (message-list-references): Do not insert duplicate Message-Id, when specified X-Git-Tag: nana-gnus-7_1_0_22~12 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c23b55cfc68c149dced64da0767cb4e358f10f7a;p=elisp%2Fgnus.git- (message-list-references): Do not insert duplicate Message-Id, when specified `message-list-references-add-position'. --- diff --git a/lisp/message.el b/lisp/message.el index 555a582..8c2fa23 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1908,28 +1908,19 @@ to REFS-LIST." (let ((pos message-list-references-add-position)) (while (and refs-list (> pos 0)) - (setq saved-id (cons (car refs-list) saved-id) - refs-list (cdr refs-list) - pos (1- pos))))) + (push (pop refs-list) saved-id) + (setq pos (1- pos))))) (while refs-strs - (setq refs (car refs-strs) - refs-strs (cdr refs-strs)) - (when refs + (when (setq refs (pop refs-strs)) (setq refs (std11-parse-msg-ids (std11-lexical-analyze refs))) (while refs - (setq ref (car refs) - refs (cdr refs)) - (when (eq (car ref) 'msg-id) - (setq id (concat "<" - (mapconcat - (function (lambda (p) (cdr p))) - (cdr ref) "") - ">")) + (when (eq (car (setq ref (pop refs))) 'msg-id) + (setq id (concat "<" (mapconcat 'cdr (cdr ref) "") ">")) (or (member id refs-list) + (member id saved-id) (push id refs-list)))))) (while saved-id - (setq refs-list (cons (car saved-id) refs-list) - saved-id (cdr saved-id))) + (push (pop saved-id) refs-list)) refs-list)) (defvar gnus-article-copy)