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

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

[elpa] master 9407824 21/34: Company doesn't like nils, remove those


From: Vitalie Spinu
Subject: [elpa] master 9407824 21/34: Company doesn't like nils, remove those
Date: Tue, 7 May 2019 16:05:28 -0400 (EDT)

branch: master
commit 9407824d2b29d427ed5732aa01cb0a8530a8259f
Author: Vitalie Spinu <address@hidden>
Commit: Vitalie Spinu <address@hidden>

    Company doesn't like nils, remove those
---
 company-math.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/company-math.el b/company-math.el
index be437bb..8ba059a 100644
--- a/company-math.el
+++ b/company-math.el
@@ -157,10 +157,11 @@ good support for mathematical symbols.
     (annotation (concat " " (get-text-property 0 :symbol arg)))
     ;; 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)
-                          (when (get-text-property 0 :symbol candidate)
-                            (concat candidate " ")))
-                        (all-completions arg company-math--symbols)))
+    (candidates (delq nil
+                      (mapcar (lambda (candidate)
+                                (when (get-text-property 0 :symbol 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]