Function: eudc-bbdb-filter-non-matching-record
eudc-bbdb-filter-non-matching-record is a byte-compiled function
defined in eudcb-bbdb.el.gz.
Signature
(eudc-bbdb-filter-non-matching-record RECORD)
Documentation
Return RECORD if it matches eudc-bbdb-current-query, nil otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/net/eudcb-bbdb.el.gz
(defun eudc-bbdb-filter-non-matching-record (record)
"Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise."
(require 'bbdb)
(catch 'unmatch
(dolist (condition eudc-bbdb-current-query)
(let ((attr (car condition))
(val (cdr condition))
(case-fold-search t))
(or (and (memq attr '(firstname lastname aka company phones
addresses net))
(let ((bbdb-val
(funcall (intern (concat "bbdb-record-"
(symbol-name
(eudc-bbdb-field
attr))))
record)))
(if (listp bbdb-val)
(if eudc-bbdb-enable-substring-matches
(seq-some (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))