[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master af962d4 012/173: company-diag: Call `annotation' in the ri
From: |
Dmitry Gutov |
Subject: |
[elpa] master af962d4 012/173: company-diag: Call `annotation' in the right buffer |
Date: |
Thu, 23 Jun 2016 00:28:34 +0000 (UTC) |
branch: master
commit af962d47817fb232f23f527e4ee1bcb61f31bbcf
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
company-diag: Call `annotation' in the right buffer
---
company.el | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/company.el b/company.el
index e8d8db7..9909d5b 100644
--- a/company.el
+++ b/company.el
@@ -2147,10 +2147,15 @@ If SHOW-VERSION is non-nil, show the version in the
echo area."
thereis (let ((company-backend b))
(setq backend b)
(company-call-backend 'prefix))))
- cc)
+ (buf (current-buffer))
+ cc annotations)
(when (stringp prefix)
- (setq cc (let ((company-backend backend))
- (company-call-backend 'candidates prefix))))
+ (let ((company-backend backend))
+ (setq cc (company-call-backend 'candidates prefix)
+ annotations
+ (mapcar
+ (lambda (c) (cons c (company-call-backend 'annotation c)))
+ cc))))
(pop-to-buffer (get-buffer-create "*company-diag*"))
(setq buffer-read-only nil)
(erase-buffer)
@@ -2168,13 +2173,11 @@ If SHOW-VERSION is non-nil, show the version in the
echo area."
(insert (message "Completions:"))
(unless cc (insert " none"))
(save-excursion
- (let ((company-backend backend))
- (dolist (c cc)
- (insert "\n " (prin1-to-string c))
- (let ((ann (company-call-backend 'annotation c)))
- (when ann
- (insert " " (prin1-to-string ann))))))
- (special-mode))))
+ (dolist (c annotations)
+ (insert "\n " (prin1-to-string (car c)))
+ (when (cdr c)
+ (insert " " (prin1-to-string (cdr c))))))
+ (special-mode)))
;;; pseudo-tooltip
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [elpa] master updated (24149b0 -> 7a2deff), Dmitry Gutov, 2016/06/22
- [elpa] master 448bcd8 007/173: company-show-doc-buffer: Bind other-window-scroll-buffer, Dmitry Gutov, 2016/06/22
- [elpa] master dae79c4 002/173: Merge branch 'search-hl-fix', Dmitry Gutov, 2016/06/22
- [elpa] master 12f55f5 013/173: Buf was unused, Dmitry Gutov, 2016/06/22
- [elpa] master e94f2ec 008/173: company-show-doc-buffer: Still call doc-buffer inside the electric block, Dmitry Gutov, 2016/06/22
- [elpa] master 125a4da 009/173: company-show-location: Mirror the latest change to company-show-doc-buffer, Dmitry Gutov, 2016/06/22
- [elpa] master 7941f6e 010/173: company-diag: Include Emacs and Company versions, Dmitry Gutov, 2016/06/22
- [elpa] master 5733f2b 011/173: company-diag: Fix the annotation call, Dmitry Gutov, 2016/06/22
- [elpa] master af962d4 012/173: company-diag: Call `annotation' in the right buffer,
Dmitry Gutov <=
- [elpa] master 5e107fd 015/173: Accept numeric argument in company-select-next and friends, Dmitry Gutov, 2016/06/22
- [elpa] master 479c676 021/173: Don't use `forward-symbol', apparently it's not in 24.3, Dmitry Gutov, 2016/06/22
- [elpa] master 41f4536 018/173: Add missing require to `company-gtags`, Dmitry Gutov, 2016/06/22
- [elpa] master b0f206a 020/173: Handle function pointers in annotation and template expansion, Dmitry Gutov, 2016/06/22
- [elpa] master d56ddaa 006/173: Allow scrolling the doc window with the mouse wheel, Dmitry Gutov, 2016/06/22
- [elpa] master a7a4ba6 014/173: Merge branch 'release', Dmitry Gutov, 2016/06/22
- [elpa] master 464a458 022/173: company-lighter: dispatch on whether company-candidates is non-nil, Dmitry Gutov, 2016/06/22
- [elpa] master b94b115 025/173: company--insert-candidate: Don't insert an empty string, Dmitry Gutov, 2016/06/22
- [elpa] master decd537 030/173: Add MELPA badge, Dmitry Gutov, 2016/06/22
- [elpa] master 22ecb92 001/173: company-clang--start-process: Disable undo in the output buffer, Dmitry Gutov, 2016/06/22