branch: master commit 0af41635943deae8928f07888c84e6efd22d318a Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
Remove an old workaround from company-capf Seems to have been fixed in 4fa5a3753091b6911e27a8ff579a7861dc7ab9f9. --- company-capf.el | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/company-capf.el b/company-capf.el index 343edca..faac44c 100644 --- a/company-capf.el +++ b/company-capf.el @@ -147,20 +147,8 @@ (let ((f (plist-get (nthcdr 4 (company--capf-data)) :company-location))) (when f (funcall f arg)))) (`annotation - (save-excursion - ;; FIXME: `company-begin' sets `company-point' after calling - ;; `company--begin-new'. We shouldn't rely on `company-point' here, - ;; better to cache the capf-data value instead. However: we can't just - ;; save the last capf-data value in `prefix', because that command can - ;; get called more often than `candidates', and at any point in the - ;; buffer (https://github.com/company-mode/company-mode/issues/153). - ;; We could try propertizing the returned prefix string, but it's not - ;; passed to `annotation', and `company-prefix' is set only after - ;; `company--strip-duplicates' is called. - (when company-point - (goto-char company-point)) - (let ((f (plist-get (nthcdr 4 (company--capf-data)) :annotation-function))) - (when f (funcall f arg))))) + (let ((f (plist-get (nthcdr 4 (company--capf-data)) :annotation-function))) + (when f (funcall f arg)))) (`require-match (plist-get (nthcdr 4 (company--capf-data)) :company-require-match)) (`init nil) ;Don't bother: plenty of other ways to initialize the code.