]> git.eshelyaron.com Git - emacs.git/commitdiff
python.el: Fix detection of native completion in Python 3 (bug #24401)
authorClément Pit--Claudel <clement.pitclaudel@live.com>
Thu, 27 Oct 2016 02:46:28 +0000 (22:46 -0400)
committerClément Pit--Claudel <clement.pitclaudel@live.com>
Mon, 31 Oct 2016 12:35:33 +0000 (08:35 -0400)
With Python 3.5, (python-shell-completion-native-get-completions ... "")
would return an empty list, causing python.el to think that native
completion was unavailable (the difference between Python 2 and Python 3
is due to https://bugs.python.org/issue25660).

* lisp/progmodes/python.el (python-shell-completion-native-try): Use "_"
  to check whether native completion is available instead of "".

lisp/progmodes/python.el

index 49f7bcf5df9a2f3b18d15e4884a8001a130d0af8..3fae3987b223234a2d7719fc5df08de415ac0f66 100644 (file)
@@ -3296,7 +3296,7 @@ When a match is found, native completion is disabled."
          python-shell-completion-native-try-output-timeout))
     (python-shell-completion-native-get-completions
      (get-buffer-process (current-buffer))
-     nil "")))
+     nil "_")))
 
 (defun python-shell-completion-native-setup ()
   "Try to setup native completion, return non-nil on success."