Commit c623f81a authored by Sergio Durigan Junior's avatar Sergio Durigan Junior Committed by Chong Yidong
Browse files

Bugfix for EUDCB-BBDB queries.

* net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix
querying BBDB for entries without a last name.

Fixes: debbugs:11580
parent fd795bf4
2012-10-02 Sergio Durigan Junior <sergiodj@riseup.net>
* net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix
querying BBDB for entries without a last name (Bug#11580).
2012-10-02 Chong Yidong <cyd@gnu.org>
 
* emacs-lisp/eieio.el: Restore Version header.
......
......@@ -166,18 +166,18 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'"
(symbol-name attr)))
'record))))
(t
(setq val "Unknown BBDB attribute")))
(if val
(cond
((memq attr '(phones addresses))
(setq eudc-rec (append val eudc-rec)))
((and (listp val)
(= 1 (length val)))
(setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
((> (length val) 0)
(setq eudc-rec (cons (cons attr val) eudc-rec)))
(t
(error "Unexpected attribute value")))))
(error "Unknown BBDB attribute")))
(cond
((or (not val) (equal val ""))) ; do nothing
((memq attr '(phones addresses))
(setq eudc-rec (append val eudc-rec)))
((and (listp val)
(= 1 (length val)))
(setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
((> (length val) 0)
(setq eudc-rec (cons (cons attr val) eudc-rec)))
(t
(error "Unexpected attribute value"))))
(nreverse eudc-rec)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment