From: Glenn Morris Date: Tue, 4 Dec 2007 03:55:40 +0000 (+0000) Subject: (bbdb-address-streets): Declare as a function. X-Git-Tag: emacs-pretest-23.0.90~9113 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c52ae2bbad5814b5fba73e368d5c6b923067b816;p=emacs.git (bbdb-address-streets): Declare as a function. (eudc-bbdb-extract-addresses): Use bbdb-address-streets rather than bbdb-address-street1,2,3. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71e4aa2bc12..429c08f72c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2007-12-04 Glenn Morris + + * 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 * saveplace.el (save-place-quiet): Remove, reverting 2007-12-02T19:54:46Z!kfogel@red-bean.com. diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index 4a1b865736a..ef1379eee52 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -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.