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> 2012-10-02 Chong Yidong <cyd@gnu.org>
   
* emacs-lisp/eieio.el: Restore Version header. * emacs-lisp/eieio.el: Restore Version header.
......
...@@ -166,18 +166,18 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'" ...@@ -166,18 +166,18 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'"
(symbol-name attr))) (symbol-name attr)))
'record)))) 'record))))
(t (t
(setq val "Unknown BBDB attribute"))) (error "Unknown BBDB attribute")))
(if val (cond
(cond ((or (not val) (equal val ""))) ; do nothing
((memq attr '(phones addresses)) ((memq attr '(phones addresses))
(setq eudc-rec (append val eudc-rec))) (setq eudc-rec (append val eudc-rec)))
((and (listp val) ((and (listp val)
(= 1 (length val))) (= 1 (length val)))
(setq eudc-rec (cons (cons attr (car val)) eudc-rec))) (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
((> (length val) 0) ((> (length val) 0)
(setq eudc-rec (cons (cons attr val) eudc-rec))) (setq eudc-rec (cons (cons attr val) eudc-rec)))
(t (t
(error "Unexpected attribute value"))))) (error "Unexpected attribute value"))))
(nreverse eudc-rec))) (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