tm 7.85.
[elisp/tm.git] / tm-bbdb.el
index 253c1b6..f9eb188 100644 (file)
@@ -1,37 +1,36 @@
-;;;
 ;;; tm-bbdb.el --- tm shared module for BBDB
-;;;
-;;; Copyright (C) 1995,1996 KOBAYASHI Shuhei
-;;; Copyright (C) 1996 Artur Pioro
-;;;
-;;; Author: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
-;;;         Artur Pioro <artur@flugor.if.uj.edu.pl>
-;;; modified by Pekka Marjola <pema@iki.fi>
-;;; Maintainer: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
-;;; Version: $Id: tm-bbdb.el,v 7.10 1996/07/01 23:43:25 morioka Exp $
-;;; Keywords: mail, news, MIME, multimedia, multilingual, BBDB
-;;;
-;;; This file is part of tm (Tools for MIME).
-;;;
-;;; This program is free software; you can redistribute it and/or
-;;; modify it under the terms of the GNU General Public License as
-;;; published by the Free Software Foundation; either version 2, or
-;;; (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;;; General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with This program.  If not, write to the Free Software
-;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-;;;
+
+;; Copyright (C) 1995,1996 KOBAYASHI Shuhei
+;; Copyright (C) 1996 Artur Pioro
+
+;; Author: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
+;;         Artur Pioro <artur@flugor.if.uj.edu.pl>
+;; Maintainer: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
+;; Version: $Id: tm-bbdb.el,v 7.15 1996/09/02 16:30:37 morioka Exp $
+;; Keywords: mail, news, MIME, multimedia, multilingual, BBDB
+
+;; This file is part of tm (Tools for MIME).
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
 ;;; Code:
 
 (require 'bbdb)
 (require 'bbdb-com)
-(require 'tl-822)
+(require 'std11)
 (require 'tm-ew-d)
 (require 'tm-view)
 
@@ -42,7 +41,7 @@
 (defvar tm-bbdb/use-mail-extr t)
 
 (defun tm-bbdb/extract-address-components (str)
-  (let* ((ret     (rfc822/extract-address-components str))
+  (let* ((ret     (std11-extract-address-components str))
          (phrase  (car ret))
          (address (car (cdr ret)))
          (methods tm-bbdb/canonicalize-full-name-methods))
@@ -129,14 +128,14 @@ the user confirms the creation."
         (set-buffer mime::article/preview-buffer))
     (if bbdb-use-pop-up
         (tm-bbdb/pop-up-bbdb-buffer offer-to-create)
-      (let* ((from (rfc822/get-field-body "From"))
+      (let* ((from (std11-field-body "From"))
              (addr (if from
                       (car (cdr (mail-extract-address-components from))))))
         (if (or (null from)
                 (null addr)
                 (string-match (bbdb-user-mail-names) addr))
-            (setq from (or (rfc822/get-field-body "To")
-                           from)))
+            (setq from (or (std11-field-body "To") from))
+         )
         (if from
             (bbdb-annotate-message-sender
              from t
@@ -190,6 +189,10 @@ displaying the record corresponding to the sender of the current message."
          (bbdb-elided-display (bbdb-pop-up-elided-display))
          (b (current-buffer)))
       (bbdb-display-records (if record (list record) nil))
+      (if (not record)
+         (progn
+           (set-buffer "*BBDB*")
+           (delete-window)))
       (set-buffer b)
       record)))
 
@@ -227,7 +230,7 @@ displaying the record corresponding to the sender of the current message."
       )))
 
 (defun signature/get-sigtype-from-bbdb (&optional verbose)
-  (let* ((to (rfc822/get-field-body "To"))
+  (let* ((to (std11-field-body "To"))
          (addr (and to
                     (car (cdr (mail-extract-address-components to)))))
          (sigtype (signature/get-bbdb-sigtype addr))