1. xemacs
  2. eudc

Source

eudc / eudcb-bbdb.el

Diff from to

File eudcb-bbdb.el

  • Ignore whitespace
   (let (s c val)
     (mapcar (function
 	     (lambda (address)
-	       (setq val (concat (unless (= 0 (length (setq s (bbdb-address-street1 address))))
-				   (concat s "\n"))
-				 (unless (= 0 (length (setq s (bbdb-address-street2 address))))
-				   (concat s "\n"))
-				 (unless (= 0 (length (setq s (bbdb-address-street3 address))))
-				   (concat s "\n"))
+	       (cond ((>= bbdb-file-format 6)
+		      (setq val (concat
+				 (bbdb-join
+				  (bbdb-address-streets address) "\n")
+				 "\n"
 				 (progn 
 				   (setq c (bbdb-address-city address))
 				   (setq s (bbdb-address-state address))
 				   (if (and (> (length c) 0) (> (length s) 0))
 				       (concat c ", " s " ")
 				     (concat c " ")))
-				 (bbdb-address-zip-string address)))
+					(bbdb-address-zip-string address))))
+		     (t
+		      (setq val (concat (unless (= 0 (length (setq s (bbdb-address-street1 address))))
+					  (concat s "\n"))
+					(unless (= 0 (length (setq s (bbdb-address-street2 address))))
+					  (concat s "\n"))
+					(unless (= 0 (length (setq s (bbdb-address-street3 address))))
+					  (concat s "\n"))
+					(progn 
+					  (setq c (bbdb-address-city address))
+					  (setq s (bbdb-address-state address))
+					  (if (and (> (length c) 0) (> (length s) 0))
+					      (concat c ", " s " ")
+					    (concat c " ")))
+					(bbdb-address-zip-string address)))))
 	       (if eudc-bbdb-use-locations-as-attribute-names
 		   (cons (intern (bbdb-address-location address)) val)
 		 (cons 'addresses (concat (bbdb-address-location address) "\n" val)))))
 	  (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
 	 ((> (length val) 0)
 	  (setq eudc-rec (cons (cons attr val) eudc-rec)))
+	 ((and (>= bbdb-file-format 6) (= (length val) 0)))
 	 (t
 	  (error "Unexpected attribute value")))))
     (nreverse eudc-rec)))
 
 (provide 'eudcb-bbdb)
 
-;;; eudcb-bbdb.el ends here
+;;; eudcb-bbdb.el ends here