Function: python-shell-completion-native-turn-on-maybe
python-shell-completion-native-turn-on-maybe is an interactive and
byte-compiled function defined in python.el.gz.
Signature
(python-shell-completion-native-turn-on-maybe &optional MSG)
Documentation
Turn on native completions if enabled and available.
With argument MSG show activation/deactivation message.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-completion-native-turn-on-maybe (&optional msg)
"Turn on native completions if enabled and available.
With argument MSG show activation/deactivation message."
(interactive "p")
(python-shell-with-shell-buffer
(when python-shell-completion-native-enable
(cond
((python-shell-completion-native-interpreter-disabled-p)
(python-shell-completion-native-turn-off msg))
((python-shell-completion-native-setup)
(when msg
(message "Shell native completion is enabled.")))
(t (lwarn
'(python python-shell-completion-native-turn-on-maybe)
:warning
(concat
"Your `python-shell-interpreter' doesn't seem to "
"support readline, yet `python-shell-completion-native-enable' "
(format "was t and %S is not part of the "
(file-name-nondirectory python-shell-interpreter))
"`python-shell-completion-native-disabled-interpreters' "
"list. Native completions have been disabled locally. "))
(python-shell-completion-native-turn-off msg))))))