Trailing whitepace deleted.
[bpt/emacs.git] / lisp / net / eudcb-bbdb.el
index a434e96..1c20c7c 100644 (file)
@@ -50,7 +50,7 @@
 
 (eudc-protocol-set 'eudc-query-function 'eudc-bbdb-query-internal 'bbdb)
 (eudc-protocol-set 'eudc-list-attributes-function nil 'bbdb)
-(eudc-protocol-set 'eudc-protocol-attributes-translation-alist 
+(eudc-protocol-set 'eudc-protocol-attributes-translation-alist
                   'eudc-bbdb-attributes-translation-alist 'bbdb)
 (eudc-protocol-set 'eudc-bbdb-conversion-alist nil 'bbdb)
 (eudc-protocol-set 'eudc-protocol-has-default-query-attributes nil 'bbdb)
        (notes (cdr (assq 'notes query)))
        (phone (cdr (assq 'phone query))))
     (list name company net notes phone)))
-       
+
 
 (defun eudc-bbdb-filter-non-matching-record (record)
   "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise."
   (catch 'unmatch
     (progn
-      (mapcar 
-       (function 
+      (mapcar
+       (function
        (lambda (condition)
          (let ((attr (car condition))
                (val (cdr condition))
                (case-fold-search t)
                bbdb-val)
            (or (and (memq attr '(firstname lastname aka company phones addresses net))
-                    (progn 
-                      (setq bbdb-val 
-                            (eval (list (intern (concat "bbdb-record-" 
+                    (progn
+                      (setq bbdb-val
+                            (eval (list (intern (concat "bbdb-record-"
                                                         (symbol-name attr)))
                                         'record)))
                       (if (listp bbdb-val)
             (if eudc-bbdb-use-locations-as-attribute-names
                 (cons (intern (bbdb-phone-location phone))
                       (bbdb-phone-string phone))
-              (cons 'phones (format "%s: %s" 
+              (cons 'phones (format "%s: %s"
                                     (bbdb-phone-location phone)
                                     (bbdb-phone-string phone))))))
          (bbdb-record-phones record)))
                                   (concat s "\n"))
                                 (unless (= 0 (length (setq s (bbdb-address-street3 address))))
                                   (concat s "\n"))
-                                (progn 
+                                (progn
                                   (setq c (bbdb-address-city address))
                                   (setq s (bbdb-address-state address))
                                   (if (and (> (length c) 0) (> (length s) 0))
@@ -143,7 +143,7 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'"
        attr
        eudc-rec
        val)
-    (while (prog1 
+    (while (prog1
               (setq attr (car attrs))
             (setq attrs (cdr attrs)))
       (cond
@@ -152,15 +152,15 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'"
        ((eq attr 'addresses)
        (setq val (eudc-bbdb-extract-addresses record)))
        ((memq attr '(firstname lastname aka company net notes))
-       (setq val (eval 
-                  (list (intern 
-                         (concat "bbdb-record-" 
+       (setq val (eval
+                  (list (intern
+                         (concat "bbdb-record-"
                                  (symbol-name attr)))
                         'record))))
        (t
        (setq val "Unknown BBDB attribute")))
       (if val
-       (cond 
+       (cond
         ((memq attr '(phones addresses))
          (setq eudc-rec (append val eudc-rec)))
         ((and (listp val)
@@ -171,14 +171,14 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'"
         (t
          (error "Unexpected attribute value")))))
     (nreverse eudc-rec)))
-       
+
 
 
 (defun eudc-bbdb-query-internal (query &optional return-attrs)
   "Query BBDB  with QUERY.
-QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid 
-BBDB attribute names.  
-RETURN-ATTRS is a list of attributes to return, defaulting to 
+QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid
+BBDB attribute names.
+RETURN-ATTRS is a list of attributes to return, defaulting to
 `eudc-default-return-attributes'."
 
   (let ((eudc-bbdb-current-query query)
@@ -202,15 +202,15 @@ RETURN-ATTRS is a list of attributes to return, defaulting to
               ;; If there were duplicate attributes reverse the order of the
               ;; record so the unique attributes appear first
               (if (> (length filtered) 1)
-                  (setq filtered (mapcar (function 
+                  (setq filtered (mapcar (function
                                           (lambda (rec)
                                             (reverse rec)))
                                          filtered)))
               (setq result (append result filtered))))
            (delq nil
-                 (mapcar 'eudc-bbdb-format-record-as-result 
-                         (delq nil 
-                               (mapcar 'eudc-bbdb-filter-non-matching-record 
+                 (mapcar 'eudc-bbdb-format-record-as-result
+                         (delq nil
+                               (mapcar 'eudc-bbdb-filter-non-matching-record
                                        records)))))
     result))