[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 17/35: company--merge-async: tweak
From: |
Dmitry Gutov |
Subject: |
[elpa] 17/35: company--merge-async: tweak |
Date: |
Sat, 19 Apr 2014 10:12:17 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 0a2220265d9248a1c8236058072a283d2d52e62f
Author: Dmitry Gutov <address@hidden>
Date: Wed Apr 2 13:07:38 2014 +0300
company--merge-async: tweak
---
company.el | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/company.el b/company.el
index d6293ee..cdda9dd 100644
--- a/company.el
+++ b/company.el
@@ -864,13 +864,12 @@ means that `company-mode' is always turned on except in
`message-mode' buffers."
(company--merge-async pairs (lambda (values) (apply #'append values)))))
(defun company--merge-async (pairs merger)
- (let ((async (loop for (val . mapper) in pairs
+ (let ((async (loop for pair in pairs
thereis
- (eq :async (car-safe val)))))
+ (eq :async (car-safe (car pair))))))
(if (not async)
- (funcall merger (mapcar (lambda (pair)
- (funcall (cdr pair) (car pair)))
- pairs))
+ (funcall merger (loop for (val . mapper) in pairs
+ collect (funcall mapper val)))
(cons
:async
(lambda (callback)
@@ -893,8 +892,7 @@ means that `company-mode' is always turned on except in
`message-mode' buffers."
(lambda (res)
(setq pending (delq fetcher pending))
(setcar cell (funcall mapper res))
- (funcall finisher)))))))
- (funcall finisher)))))))
+ (funcall finisher)))))))))))))
;;; completion mechanism
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [elpa] 02/35: More robust and simpler logic in prefix test, (continued)
- [elpa] 02/35: More robust and simpler logic in prefix test, Dmitry Gutov, 2014/04/19
- [elpa] 03/35: Test new prefix behavior, option company-abort-manual-when-too-short, Dmitry Gutov, 2014/04/19
- [elpa] 08/35: Use `condition-case-unless-debug', Dmitry Gutov, 2014/04/19
- [elpa] 04/35: Minor tweaks, Dmitry Gutov, 2014/04/19
- [elpa] 07/35: Drop support for `crop', Dmitry Gutov, 2014/04/19
- [elpa] 10/35: Bump version, Dmitry Gutov, 2014/04/19
- [elpa] 09/35: Add Package-Requires header, Dmitry Gutov, 2014/04/19
- [elpa] 13/35: Make company-clang work asynchronously, Dmitry Gutov, 2014/04/19
- [elpa] 12/35: Remove `company-locate-dominating-file', Dmitry Gutov, 2014/04/19
- [elpa] 16/35: Update NEWS, Dmitry Gutov, 2014/04/19
- [elpa] 17/35: company--merge-async: tweak,
Dmitry Gutov <=
- [elpa] 19/35: Move company-elisp require, Dmitry Gutov, 2014/04/19
- [elpa] 14/35: Implement async operation for grouped backends, Dmitry Gutov, 2014/04/19
- [elpa] 18/35: company--force-sync: change calling convention, Dmitry Gutov, 2014/04/19
- [elpa] 20/35: Change the summary, Dmitry Gutov, 2014/04/19
- [elpa] 22/35: company--multi-backend-adapter-candidates: bind backend locally, Dmitry Gutov, 2014/04/19
- [elpa] 21/35: Define and use `company-grab-symbol-cons', Dmitry Gutov, 2014/04/19
- [elpa] 23/35: Introduce `company-tooltip-minimum-width', Dmitry Gutov, 2014/04/19
- [elpa] 25/35: Make version string compatible with Emacs < 24.4, Dmitry Gutov, 2014/04/19
- [elpa] 24/35: Lower company-idle-delay, Dmitry Gutov, 2014/04/19
- [elpa] 06/35: Drop Emacs 23 compatibility, Dmitry Gutov, 2014/04/19