From: Clément Pit--Claudel Date: Thu, 27 Oct 2016 02:46:28 +0000 (-0400) Subject: python.el: Fix detection of native completion in Python 3 (bug #24401) X-Git-Tag: emacs-25.1.90~73 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dbb3410;p=emacs.git python.el: Fix detection of native completion in Python 3 (bug #24401) 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 "". --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 49f7bcf5df9..3fae3987b22 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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."