emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 26/30: Call `bbdb-search' inside `eval' block


From: Dmitry Gutov
Subject: [elpa] 26/30: Call `bbdb-search' inside `eval' block
Date: Tue, 14 Oct 2014 22:22:55 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit 96bf7b8611e8633238d1bc2b6b8b7d6bd040ec1a
Author: Dmitry Gutov <address@hidden>
Date:   Fri Oct 10 06:22:34 2014 +0400

    Call `bbdb-search' inside `eval' block
    
    Fixes #202
---
 company-bbdb.el |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/company-bbdb.el b/company-bbdb.el
index acdd30a..22741a2 100644
--- a/company-bbdb.el
+++ b/company-bbdb.el
@@ -27,6 +27,12 @@
 (declare-function bbdb-dwim-mail "bbdb-com")
 (declare-function bbdb-search "bbdb-com")
 
+(defun company-bbdb--candidates (arg)
+  (cl-mapcan (lambda (record)
+               (mapcar (lambda (mail) (bbdb-dwim-mail record mail))
+                       (bbdb-record-get-field record 'mail)))
+             (eval '(bbdb-search (bbdb-records) arg nil arg))))
+
 ;;;###autoload
 (defun company-bbdb (command &optional arg &rest ignore)
   "`company-mode' completion back-end for `bbdb'."
@@ -38,10 +44,7 @@
                  (looking-back "^\\(To\\|Cc\\|Bcc\\):.*"
                                (line-beginning-position))
                  (company-grab-symbol)))
-    (candidates (cl-mapcan (lambda (record)
-                             (mapcar (lambda (mail) (bbdb-dwim-mail record 
mail))
-                                     (bbdb-record-get-field record 'mail)))
-                           (bbdb-search (bbdb-records) arg nil arg)))
+    (candidates (company-bbdb--candidates arg))
     (sorted t)
     (no-cache t)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]