[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)))
- [elpa] 19/30: company-clang-arguments: Fix default element value, (continued)
- [elpa] 19/30: company-clang-arguments: Fix default element value, Dmitry Gutov, 2014/10/14
- [elpa] 21/30: company-call-backend-raw: Use `condition-case-unless-debug', too, Dmitry Gutov, 2014/10/14
- [elpa] 20/30: Handle non-printable and multiple-width chars in completions, Dmitry Gutov, 2014/10/14
- [elpa] 18/30: Use `condition-case-unless-debug' more, Dmitry Gutov, 2014/10/14
- [elpa] 22/30: company-dabbrev--search: Ignore "uninteresting" buffers, Dmitry Gutov, 2014/10/14
- [elpa] 23/30: Make new tests and interactive-only, Dmitry Gutov, 2014/10/14
- [elpa] 24/30: company-fill-propertize: Use `string-width' on `company-common', Dmitry Gutov, 2014/10/14
- [elpa] 25/30: Handle nil company-common, in order not to bind it in tests, Dmitry Gutov, 2014/10/14
- [elpa] 12/30: Update NEWS; do the forgotten version bump, Dmitry Gutov, 2014/10/14
- [elpa] 14/30: company-files.el: Use the "private function" naming convention, Dmitry Gutov, 2014/10/14
- [elpa] 26/30: Call `bbdb-search' inside `eval' block,
Dmitry Gutov <=
- [elpa] 27/30: Extract regexp for buffers to ignore into a new var, Dmitry Gutov, 2014/10/14
- [elpa] 28/30: company-template-c-like-templatify: Support generics, Dmitry Gutov, 2014/10/14
- [elpa] 29/30: Bump the version, Dmitry Gutov, 2014/10/14
- [elpa] 30/30: Merge commit '60d4c09c982a1c562a70cd6aa705f47ab3badcfb' from company, Dmitry Gutov, 2014/10/14