branch: externals/cape commit f61da109a9e4491614938c300291060fd8855c1b Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
`cape-company-to-capf` should not be used if `company-mode` is enabled Instead the Company backends should be used directly, to avoid the unnecessary indirection and potential performance and compatibility issues due to the double conversion Company -> Capf -> Company. --- cape.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cape.el b/cape.el index b5f6c5d93a..adab1f1622 100644 --- a/cape.el +++ b/cape.el @@ -824,6 +824,8 @@ changed. The function `cape-company-to-capf' is experimental." (lambda () (when (and (symbolp backend) (not (fboundp backend))) (ignore-errors (require backend nil t))) + (when (bound-and-true-p company-mode) + (error "`cape-company-to-capf' should not be used with `company-mode', use the Company backend directly instead")) (when (and (symbolp backend) (not (alist-get backend cape--company-init))) (funcall backend 'init) (put backend 'company-init t)