diff options
| author | Glenn Morris | 2007-10-13 03:02:35 +0000 |
|---|---|---|
| committer | Glenn Morris | 2007-10-13 03:02:35 +0000 |
| commit | 888ca6f573bea3361d7039dde2a125531c825ae1 (patch) | |
| tree | a8a26b399510f0bd492b9f36a8b1f3355ffc5495 | |
| parent | fdad1919b9b25c7e19fe6d22e7947634254a4046 (diff) | |
| download | emacs-888ca6f573bea3361d7039dde2a125531c825ae1.tar.gz emacs-888ca6f573bea3361d7039dde2a125531c825ae1.zip | |
(eudc-bbdb-filter-non-matching-record)
(eudc-bbdb-query-internal): Use mapc rather than mapcar.
| -rw-r--r-- | lisp/net/eudcb-bbdb.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index f84d98aaed8..7e37d9d4123 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el | |||
| @@ -75,7 +75,7 @@ | |||
| 75 | "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise." | 75 | "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise." |
| 76 | (catch 'unmatch | 76 | (catch 'unmatch |
| 77 | (progn | 77 | (progn |
| 78 | (mapcar | 78 | (mapc |
| 79 | (function | 79 | (function |
| 80 | (lambda (condition) | 80 | (lambda (condition) |
| 81 | (let ((attr (car condition)) | 81 | (let ((attr (car condition)) |
| @@ -197,22 +197,22 @@ RETURN-ATTRS is a list of attributes to return, defaulting to | |||
| 197 | (if (car query-attrs) | 197 | (if (car query-attrs) |
| 198 | (setq records (eval `(bbdb-search ,(quote records) ,@bbdb-attrs)))) | 198 | (setq records (eval `(bbdb-search ,(quote records) ,@bbdb-attrs)))) |
| 199 | (setq query-attrs (cdr query-attrs))) | 199 | (setq query-attrs (cdr query-attrs))) |
| 200 | (mapcar (function | 200 | (mapc (function |
| 201 | (lambda (record) | 201 | (lambda (record) |
| 202 | (setq filtered (eudc-filter-duplicate-attributes record)) | 202 | (setq filtered (eudc-filter-duplicate-attributes record)) |
| 203 | ;; If there were duplicate attributes reverse the order of the | 203 | ;; If there were duplicate attributes reverse the order of the |
| 204 | ;; record so the unique attributes appear first | 204 | ;; record so the unique attributes appear first |
| 205 | (if (> (length filtered) 1) | 205 | (if (> (length filtered) 1) |
| 206 | (setq filtered (mapcar (function | 206 | (setq filtered (mapcar (function |
| 207 | (lambda (rec) | 207 | (lambda (rec) |
| 208 | (reverse rec))) | 208 | (reverse rec))) |
| 209 | filtered))) | 209 | filtered))) |
| 210 | (setq result (append result filtered)))) | 210 | (setq result (append result filtered)))) |
| 211 | (delq nil | 211 | (delq nil |
| 212 | (mapcar 'eudc-bbdb-format-record-as-result | 212 | (mapcar 'eudc-bbdb-format-record-as-result |
| 213 | (delq nil | 213 | (delq nil |
| 214 | (mapcar 'eudc-bbdb-filter-non-matching-record | 214 | (mapcar 'eudc-bbdb-filter-non-matching-record |
| 215 | records))))) | 215 | records))))) |
| 216 | result)) | 216 | result)) |
| 217 | 217 | ||
| 218 | ;;}}} | 218 | ;;}}} |