+2000-05-10 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/gnus-vers.el (gnus-revision-number): Increment to 01.
+
+2000-05-10 Keiichi Suzuki <keiichi@mdcnet.co.jp>
+
+ * lisp/message.el (message-list-references): Do not insert
+ duplicate Message-Id, when specified
+ `message-list-references-add-position'.
+
+ * lisp/gnus-bbdb.el (gnus-bbdb/split-mail): Support group address.
+ (gnus-bbdb/insert-address-regexp): New function.
+
2000-05-09 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus-msg.el (gnus-debug): Add "nntp.el" and `defvoo'.
-;; gnus-bbdb.el --- Interface to Semi-gnus
+;; gnus-bbdb.el --- Interface to T-gnus
;; Copyright (c) 1991,1992,1993 Jamie Zawinski <jwz@netscape.com>.
;; Copyright (C) 1995,1996,1997 Shuhei KOBAYASHI
;; Author: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
;; Keywords: BBDB, MIME, multimedia, multilingual, mail, news
-;; This file is part of Semi-gnus.
+;; This file is part of T-gnus.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
(require 'std11)
(eval-when-compile
(defvar bbdb-pop-up-elided-display) ; default unbound.
- (require 'gnus-win))
+ (require 'gnus-win)
+ (require 'cl))
(defvar gnus-bbdb/decode-field-body-function 'nnheader-decode-field-body
"*Field body decoder.")
(std11-field-end))
header-values)))
(let ((address-regexp
- (mapconcat
- (lambda (lal)
- (regexp-quote (std11-address-string lal)))
- (apply 'nconc
- (mapcar #'std11-parse-addresses-string
- header-values))
- "\\|")))
+ (with-temp-buffer
+ (let (lal)
+ (while header-values
+ (setq lal (std11-parse-addresses-string
+ (pop header-values)))
+ (while lal
+ (gnus-bbdb/insert-address-regexp (pop lal)))))
+ (buffer-string))))
(unless (zerop (length address-regexp))
(gnus-bbdb/split-mail-1 address-regexp bbdb-field regexp group))))))
+(defun gnus-bbdb/insert-address-regexp (address)
+ "Insert string of address part from parsed ADDRESS of RFC 822."
+ (cond ((eq (car address) 'group)
+ (setq address (cdr address))
+ (while address
+ (gnus-bbdb/insert-address-regexp (pop address))))
+ ((eq (car address) 'mailbox)
+ (unless (eq (point) (point-min))
+ (insert "\\|"))
+ (let ((addr (nth 1 address)))
+ (insert (std11-addr-to-string
+ (if (eq (car addr) 'phrase-route-addr)
+ (nth 2 addr)
+ (cdr addr))))))))
+
(defun gnus-bbdb/split-mail-1 (address-regexp bbdb-field regexp group)
(let ((records (bbdb-search (bbdb-records) nil nil address-regexp))
prop rest)
(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)