Commit c52ae2bb authored by Glenn Morris's avatar Glenn Morris
Browse files

(bbdb-address-streets): Declare as a function.

(eudc-bbdb-extract-addresses): Use bbdb-address-streets rather than
bbdb-address-street1,2,3.
parent 3428c0e9
2007-12-04 Glenn Morris <rgm@gnu.org>
* emulation/cua-base.el (top-level): Move (provide 'cua-base) to end.
No longer provide 'cua. Don't require cua-rect, cua-gmrk when
compiling.
(cua-set-rectangle-mark): Add doc string to autoload.
(cua--rectangle, cua--last-killed-rectangle)
(cua--global-mark-active): Always define for compiler.
(cua-copy-rectangle, cua-cut-rectangle, cua--rectangle-left)
(cua--delete-rectangle, cua--insert-rectangle)
(cua--rectangle-corner, cua--rectangle-assert)
(cua--insert-at-global-mark, cua--global-mark-post-command):
Declare as functions.
* emulation/cua-gmrk.el (top-level): Move provide to end.
* emulation/cua-rect.el (top-level): Move provide to end.
Don't require cua-gmrk when compiling.
(cua--cut-rectangle-to-global-mark)
(cua--copy-rectangle-to-global-mark): Declare as functions.
* emulation/viper-init.el (viper-replace-overlay-cursor-color)
(viper-insert-state-cursor-color, viper-emacs-state-cursor-color)
(viper-vi-state-cursor-color): Consolidate
make-variable-frame-local calls.
* net/eudcb-bbdb.el (bbdb-address-streets): Declare as a function.
(eudc-bbdb-extract-addresses): Use bbdb-address-streets rather
than bbdb-address-street1,2,3.
* textmodes/reftex-toc.el (reftex-make-separate-toc-frame):
Try x-focus-frame before focus-frame. Only try focus-frame on XEmacs.
2007-12-03 Karl Fogel <kfogel@red-bean.com>
* saveplace.el (save-place-quiet): Remove, reverting 2007-12-02T19:54:46Z!kfogel@red-bean.com.
......
......@@ -107,8 +107,7 @@
(declare-function bbdb-phone-location "ext:bbdb" t) ; via bbdb-defstruct
(declare-function bbdb-phone-string "ext:bbdb" (phone))
(declare-function bbdb-record-phones "ext:bbdb" t) ; via bbdb-defstruct
;; FIXME: bbdb-address-street1/2/3 don't seem to exist in current
;; bbdb, so this code is probably broken.
(declare-function bbdb-address-streets "ext:bbdb" t) ; via bbdb-defstruct
(declare-function bbdb-address-city "ext:bbdb" t) ; via bbdb-defstruct
(declare-function bbdb-address-state "ext:bbdb" t) ; via bbdb-defstruct
(declare-function bbdb-address-zip "ext:bbdb" t) ; via bbdb-defstruct
......@@ -130,25 +129,24 @@
(defun eudc-bbdb-extract-addresses (record)
(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"))
(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 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)))))
(bbdb-record-addresses record))))
(mapcar (lambda (address)
(setq c (bbdb-address-streets address))
(dotimes (n 3)
(unless (zerop (length (setq s (nth n c))))
(setq val (concat val s "\n"))))
(setq c (bbdb-address-city address)
s (bbdb-address-state address))
(setq val (concat val
(if (and (> (length c) 0) (> (length s) 0))
(concat c ", " s)
c)
" "
(bbdb-address-zip 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))))
(bbdb-record-addresses record))))
(defun eudc-bbdb-format-record-as-result (record)
"Format the BBDB RECORD as a EUDC query result record.
......
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