emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/cape 8f5f8d6716: cape-company-to-capf: Ensure that anno


From: ELPA Syncer
Subject: [elpa] externals/cape 8f5f8d6716: cape-company-to-capf: Ensure that annotations are prefixed with a space
Date: Sat, 12 Mar 2022 05:57:18 -0500 (EST)

branch: externals/cape
commit 8f5f8d67169e2c889b78d5d19f27684aed6daa3e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    cape-company-to-capf: Ensure that annotations are prefixed with a space
    
    cc @galeo
---
 cape.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cape.el b/cape.el
index c87d2bf529..17e3e11529 100644
--- a/cape.el
+++ b/cape.el
@@ -963,7 +963,11 @@ This feature is experimental."
                 :company-docsig (lambda (x) (cape--company-call backend 'meta 
x))
                 :company-deprecated (lambda (x) (cape--company-call backend 
'deprecated x))
                 :company-kind (lambda (x) (cape--company-call backend 'kind x))
-                :annotation-function (lambda (x) (cape--company-call backend 
'annotation x))
+                :annotation-function (lambda (x)
+                                       (when-let (ann (cape--company-call 
backend 'annotation x))
+                                         (if (string-match-p "^[ \t]" ann)
+                                             ann
+                                           (concat " " ann))))
                 :exit-function
                 (lambda (x _status)
                   (cape--company-call backend 'post-completion



reply via email to

[Prev in Thread] Current Thread [Next in Thread]