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

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

[elpa] master be2f586 100/173: Add workaround for bug#18067


From: Dmitry Gutov
Subject: [elpa] master be2f586 100/173: Add workaround for bug#18067
Date: Thu, 23 Jun 2016 00:28:42 +0000 (UTC)

branch: master
commit be2f586fc09c98d19d1e7d6c5854a02ed6716650
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Add workaround for bug#18067
    
    Fixes #440
---
 company-capf.el |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/company-capf.el b/company-capf.el
index 0b88e2b..3094ea3 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -48,11 +48,19 @@
               ;; the latter comes later.
               (remove 'tags-completion-at-point-function
                       (default-value 'completion-at-point-functions)))
+             (completion-at-point-functions (company--capf-workaround))
              (data (run-hook-wrapped 'completion-at-point-functions
                                      ;; Ignore misbehaving functions.
                                      #'completion--capf-wrapper 'optimist)))
     (when (and (consp (cdr data)) (integer-or-marker-p (nth 1 data))) data)))
 
+(defun company--capf-workaround ()
+  ;; For http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18067
+  (if (or (not (memq 'python-completion-at-point 
completion-at-point-functions))
+          (python-shell-get-process))
+      completion-at-point-functions
+    (remq 'python-completion-at-point completion-at-point-functions)))
+
 (defun company-capf (command &optional arg &rest _args)
   "`company-mode' backend using `completion-at-point-functions'."
   (interactive (list 'interactive))



reply via email to

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