;;; Artur Pioro <artur@flugor.if.uj.edu.pl>
;;; Created: 1994/7/11
;;; Version:
-;;; $Id: signature.el,v 7.6 1996/03/13 17:30:16 morioka Exp $
+;;; $Id: signature.el,v 7.7 1996/03/14 13:39:57 morioka Exp $
;;; Keywords: mail, news, signature
;;;
;;; This file is part of tm (Tools for MIME).
;;; (("To" . ("sim" "oku")) . "~/.signature-formal")
;;; ))
+(autoload 'signature-check-in-bbdb "tm-bbdb")
+
(defun signature/get-signature-file-name ()
(catch 'tag
(let ((r signature-file-alist) cell b f)
(call-interactively 'signature/insert-signature-at-eof)
(call-interactively 'signature/insert-signature-at-point)))
-(defun signature-check-in-bbdb (address)
- "Returns 'sigtype field from BBDB for user specified by ADDRESS"
- (require 'bbdb)
- (require 'bbdb-com)
- (let ((addr-comp (mail-extract-address-components address))
- full-name net-name records record sigtype)
- (setq full-name (car addr-comp))
- (setq net-name (mapconcat (lambda (x) x) (cdr addr-comp) "\\|"))
- (setq records
- (or
- (and full-name
- (bbdb-search (bbdb-records) full-name))
- (and net-name
- (bbdb-search (bbdb-records) nil nil net-name))))
- (setq record (car records))
- (setq records (cdr records))
- (setq sigtype (and record (bbdb-record-getprop record 'sigtype)))
- (while (and (not sigtype) records)
- (setq record (car records))
- (setq records (cdr records))
- (setq sigtype (bbdb-record-getprop record 'sigtype)))
- (if sigtype
- (message (concat "Using signature for: "
- (bbdb-record-firstname record) " "
- (bbdb-record-lastname record)
- (and (bbdb-record-aka record)
- (concat " (AKA: "
- (car (bbdb-record-aka record))
- ")"))
- " <" (car (bbdb-record-net record)) ">")))
- sigtype))
-
;;; @ end
;;;