[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/eudc-bbdb-3 3636aa2 03/15: EUDC: Fix whitespace in
From: |
Thomas Fitzsimmons |
Subject: |
[Emacs-diffs] scratch/eudc-bbdb-3 3636aa2 03/15: EUDC: Fix whitespace in BBDB backend |
Date: |
Tue, 21 Nov 2017 23:47:51 -0500 (EST) |
branch: scratch/eudc-bbdb-3
commit 3636aa23be61747daa80b9c8f410552d248132d0
Author: Thomas Fitzsimmons <address@hidden>
Commit: Thomas Fitzsimmons <address@hidden>
EUDC: Fix whitespace in BBDB backend
* lisp/net/eudcb-bbdb.el (eudc-bbdb-format-query): Fix
whitespace.
(eudc-bbdb-filter-non-matching-record): Likewise.
(eudc-bbdb-extract-addresses): Likewise.
---
lisp/net/eudcb-bbdb.el | 84 +++++++++++++++++++++++++-------------------------
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el
index f9c8578..7edc740 100644
--- a/lisp/net/eudcb-bbdb.el
+++ b/lisp/net/eudcb-bbdb.el
@@ -86,30 +86,30 @@ BBDB < 3 used `net'; BBDB >= 3 uses `mail'."
(catch 'unmatch
(progn
(dolist (condition eudc-bbdb-current-query)
- (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-"
- (symbol-name
- (eudc-bbdb-field
- attr))))
- 'record)))
- (if (listp bbdb-val)
- (if eudc-bbdb-enable-substring-matches
- (eval `(or ,@(mapcar (lambda (subval)
- (string-match val subval))
- bbdb-val)))
- (member (downcase val)
- (mapcar 'downcase bbdb-val)))
- (if eudc-bbdb-enable-substring-matches
- (string-match val bbdb-val)
- (string-equal (downcase val) (downcase bbdb-val))))))
- (throw 'unmatch nil))))
+ (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-"
+ (symbol-name
+ (eudc-bbdb-field
+ attr))))
+ 'record)))
+ (if (listp bbdb-val)
+ (if eudc-bbdb-enable-substring-matches
+ (eval `(or ,@(mapcar (lambda (subval)
+ (string-match val subval))
+ bbdb-val)))
+ (member (downcase val)
+ (mapcar 'downcase bbdb-val)))
+ (if eudc-bbdb-enable-substring-matches
+ (string-match val bbdb-val)
+ (string-equal (downcase val) (downcase bbdb-val))))))
+ (throw 'unmatch nil))))
record)))
;; External.
@@ -123,7 +123,7 @@ BBDB < 3 used `net'; BBDB >= 3 uses `mail'."
(declare-function bbdb-address-location "ext:bbdb" t) ; via bbdb-defstruct
(declare-function bbdb-record-addresses "ext:bbdb" t) ; via bbdb-defstruct
(declare-function bbdb-records "ext:bbdb"
- (&optional dont-check-disk already-in-db-buffer))
+ (&optional dont-check-disk already-in-db-buffer))
(defun eudc-bbdb-extract-phones (record)
(require 'bbdb)
@@ -141,23 +141,23 @@ BBDB < 3 used `net'; BBDB >= 3 uses `mail'."
(require 'bbdb)
(let (s c val)
(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))))
+ (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.
- [Emacs-diffs] branch scratch/eudc-bbdb-3 created (now 69e8cb9), Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 c6c1286 02/15: EUDC: Fix indentation in BBDB backend, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 3636aa2 03/15: EUDC: Fix whitespace in BBDB backend,
Thomas Fitzsimmons <=
- [Emacs-diffs] scratch/eudc-bbdb-3 5e6c763 14/15: EUDC: Wrap long lines in eudc-export.el, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 e02938d 11/15: EUDC: Obsolete eudc--using-bbdb-3-or-newer-p, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 06c3557 08/15: EUDC: Require bbdb and bbdb-com without ignoring errors, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 2beb511 04/15: EUDC: Wrap long line in BBDB backend, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 f529b7d 07/15: EUDC: Fix issues reported by checkdoc, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 262dce0 09/15: EUDC: Remove external BBDB function declarations, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 69e8cb9 15/15: EUDC: Port eudc-export.el to BBDB >= 3, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 f1ab95d 12/15: EUDC: Require bbdb, bbdb-com without NOERROR, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 c80692b 05/15: EUDC: Keep phone and address lists in BBDB-order, Thomas Fitzsimmons, 2017/11/21
- [Emacs-diffs] scratch/eudc-bbdb-3 05257b9 10/15: EUDC: Port BBDB backend to BBDB >= 3, Thomas Fitzsimmons, 2017/11/21