1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

; Check process in 'python-shell-completion-at-point'

* lisp/progmodes/python.el (python-shell-completion-at-point):
Check the PROCESS argument at the beginning of the function.
(Bug#70707)
This commit is contained in:
Lin Sun 2024-05-01 06:55:31 +00:00 committed by Eli Zaretskii
parent 08799957f0
commit 751e21af42

View file

@ -4738,6 +4738,8 @@ as one line, which is required by native completion."
Optional argument PROCESS forces completions to be retrieved
using that one instead of current buffer's process."
(setq process (or process (get-buffer-process (current-buffer))))
(unless process
(user-error "No active python inferior process"))
(let* ((is-shell-buffer (derived-mode-p 'inferior-python-mode))
(line-start (if is-shell-buffer
;; Working on a shell buffer: use prompt end.