aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9c5e1e5ee6c..5a820f05d77 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -4514,6 +4514,13 @@ def __PYTHON_EL_get_completions(text):
4514 "Code used to setup completion in inferior Python processes." 4514 "Code used to setup completion in inferior Python processes."
4515 :type 'string) 4515 :type 'string)
4516 4516
4517(defun python-shell-completion-send-setup-code ()
4518 "Send `python-shell-completion-setup-code' to inferior Python process."
4519 (python-shell-send-string-no-output python-shell-completion-setup-code))
4520
4521(add-hook 'python-shell-first-prompt-hook
4522 #'python-shell-completion-send-setup-code)
4523
4517(define-obsolete-variable-alias 4524(define-obsolete-variable-alias
4518 'python-shell-completion-module-string-code 4525 'python-shell-completion-module-string-code
4519 'python-shell-completion-string-code 4526 'python-shell-completion-string-code
@@ -4844,8 +4851,7 @@ With argument MSG show activation/deactivation message."
4844 (with-current-buffer (process-buffer process) 4851 (with-current-buffer (process-buffer process)
4845 (let ((completions 4852 (let ((completions
4846 (python-shell-send-string-no-output 4853 (python-shell-send-string-no-output
4847 (format "%s\nprint(__PYTHON_EL_get_completions(%s))" 4854 (format "print(__PYTHON_EL_get_completions(%s))"
4848 python-shell-completion-setup-code
4849 (python-shell--encode-string input)) 4855 (python-shell--encode-string input))
4850 process))) 4856 process)))
4851 (condition-case nil 4857 (condition-case nil