It is possible for an automatically harvested record not to have a name
or company associated with it.  In that case, the functions
bbdb-record-name and bbdb-record-company return nil.  On the other hand,
downcase expects a string, and this leads to an error.  So it's good to
have a default value for name in bbdb-completion-check-record.  Here's a
possible diff.

% cvs diff -c bbdb-com.el
Index: bbdb-com.el
===================================================================
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-com.el,v
retrieving revision 1.80
diff -c -r1.80 bbdb-com.el
*** bbdb-com.el 2000/08/14 15:24:11     1.80
--- bbdb-com.el 2000/09/02 22:10:37
***************
*** 1794,1803 ****
  
  ;;;###autoload
  (defun bbdb-completion-check-record (sym rec)
!   (let ((name (downcase (or (bbdb-record-name rec)
!                             (bbdb-record-company rec))))
!         (nets (bbdb-record-net rec))
!         ok)
  
      (if (null bbdb-completion-type)
          (setq ok 't)
--- 1794,1809 ----
  
  ;;;###autoload
  (defun bbdb-completion-check-record (sym rec)
!   (let (
!       
!       ;; Replace name with empty string if that's the best
!       ;; you can do.
!       (name (or (bbdb-record-name rec)
!                 (bbdb-record-company rec)
!                 ""))
!       
!       (nets (bbdb-record-net rec))
!       ok)
  
      (if (null bbdb-completion-type)
          (setq ok 't)

Alex.
_______________________________________________
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info

Reply via email to