[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 390d9af442: company-capf: Look up annotation-fu
From: |
ELPA Syncer |
Subject: |
[elpa] externals/company 390d9af442: company-capf: Look up annotation-function inside table's metadata as well |
Date: |
Sat, 26 Mar 2022 20:57:20 -0400 (EDT) |
branch: externals/company
commit 390d9af44209e82581bb80b3b3ca04375402d4a6
Author: Tony <luneth1314@gmail.com>
Commit: Dmitry Gutov <dgutov@yandex.ru>
company-capf: Look up annotation-function inside table's metadata as well
Fixes #1305
Copyright-paperwork-exempt: yes
---
company-capf.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/company-capf.el b/company-capf.el
index 52f677f703..6c8dcc78a5 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -165,8 +165,16 @@ so we can't just use the preceding variable instead.")
))
(defun company-capf--annotation (arg)
- (let* ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
- :annotation-function))
+ (let* ((f (or (plist-get (nthcdr 4 company-capf--current-completion-data)
+ :annotation-function)
+ ;; FIXME: Add a test.
+ (cdr (assq 'annotation-function
+ (completion-metadata
+ (buffer-substring (nth 1
company-capf--current-completion-data)
+ (nth 2
company-capf--current-completion-data))
+ (nth 3 company-capf--current-completion-data)
+ (plist-get (nthcdr 4
company-capf--current-completion-data)
+ :predicate))))))
(annotation (when f (funcall f arg))))
(if (and company-format-margin-function
(equal annotation " <f>") ; elisp-completion-at-point, pre-icons
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/company 390d9af442: company-capf: Look up annotation-function inside table's metadata as well,
ELPA Syncer <=