Skip to content
Snippets Groups Projects
Commit 393e4ee72dce authored by oscarf's avatar oscarf
Browse files

(eudc-bbdb-filter-non-matching-record): Use the new variable

`eudc-bbdb-enable-substring-matches'.
Fixed for multi-valued BBDB results
parent c689c50cf566
No related branches found
No related tags found
No related merge requests found
......@@ -85,5 +85,6 @@
(function
(lambda (condition)
(let ((attr (car condition))
(val (cdr condition)))
(val (cdr condition))
bbdb-val)
(or (and (memq attr '(firstname lastname aka company phones addresses net))
......@@ -89,4 +90,6 @@
(or (and (memq attr '(firstname lastname aka company phones addresses net))
(equal (downcase
(eval (list (intern (concat "bbdb-record-" (symbol-name attr)))
(progn
(setq bbdb-val
(eval (list (intern (concat "bbdb-record-"
(symbol-name attr)))
'record)))
......@@ -92,5 +95,15 @@
'record)))
(downcase val)))
(if (listp bbdb-val)
(if eudc-bbdb-enable-substring-matches
(eval `(or ,@(mapcar '(lambda (subval)
(string-match (downcase val)
(downcase subval)))
bbdb-val)))
(member (downcase val)
(mapcar 'downcase bbdb-val)))
(if eudc-bbdb-enable-substring-matches
(string-match (downcase val) bbdb-val)
(equal (downcase val) bbdb-val)))))
(throw 'unmatch nil)))))
eudc-bbdb-current-query)
record)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment