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

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

[elpa] master ce46d91 16/34: Merge pull request #7 from cpitclaudel/alwa


From: Vitalie Spinu
Subject: [elpa] master ce46d91 16/34: Merge pull request #7 from cpitclaudel/always-offer-completions
Date: Tue, 7 May 2019 16:05:27 -0400 (EDT)

branch: master
commit ce46d91d8fe808f4a8e80f397d2d19406c85b303
Merge: 21ac1c7 3c906cd
Author: Vitalie Spinu <address@hidden>
Commit: Vitalie Spinu <address@hidden>

    Merge pull request #7 from cpitclaudel/always-offer-completions
    
    Always offer completions (workaround for company issue #476)
---
 company-math.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/company-math.el b/company-math.el
index 7f944ed..bf9d0e0 100644
--- a/company-math.el
+++ b/company-math.el
@@ -147,9 +147,13 @@ corresponding unicode symbol."
   (cl-case command
     (interactive (company-begin-backend 'company-math-symbols-unicode))
     (prefix (company-math--prefix company-math-allow-unicode-symbols-in-faces
-                                 
company-math-disallow-unicode-symbols-in-faces))
+                                  
company-math-disallow-unicode-symbols-in-faces))
     (annotation (concat " " (get-text-property 0 :symbol arg)))
-    (candidates (all-completions arg company-math--symbols))
+    ;; Space added to ensure that completions are never typed in full.
+    ;; See https://github.com/company-mode/company-mode/issues/476
+    (candidates (mapcar (lambda (candidate)
+                          (concat candidate " "))
+                        (all-completions arg company-math--symbols)))
     (post-completion (company-math--substitute-unicode
                      (get-text-property 0 :symbol arg)))))
 



reply via email to

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