diff options
| author | Lin Sun | 2024-05-01 06:55:31 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2024-05-09 10:56:21 +0300 |
| commit | 751e21af42e905d0448baa7be4a7ae6d6ae6734a (patch) | |
| tree | f89b546ee12f052dbac85e32704b24420050a38f /lisp/progmodes/python.el | |
| parent | 08799957f0bade04a8f65a06dac1606346ee8733 (diff) | |
| download | emacs-751e21af42e905d0448baa7be4a7ae6d6ae6734a.tar.gz emacs-751e21af42e905d0448baa7be4a7ae6d6ae6734a.zip | |
; 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)
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0bee98871e4..831bec7f4af 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -4738,6 +4738,8 @@ as one line, which is required by native completion." | |||
| 4738 | Optional argument PROCESS forces completions to be retrieved | 4738 | Optional argument PROCESS forces completions to be retrieved |
| 4739 | using that one instead of current buffer's process." | 4739 | using that one instead of current buffer's process." |
| 4740 | (setq process (or process (get-buffer-process (current-buffer)))) | 4740 | (setq process (or process (get-buffer-process (current-buffer)))) |
| 4741 | (unless process | ||
| 4742 | (user-error "No active python inferior process")) | ||
| 4741 | (let* ((is-shell-buffer (derived-mode-p 'inferior-python-mode)) | 4743 | (let* ((is-shell-buffer (derived-mode-p 'inferior-python-mode)) |
| 4742 | (line-start (if is-shell-buffer | 4744 | (line-start (if is-shell-buffer |
| 4743 | ;; Working on a shell buffer: use prompt end. | 4745 | ;; Working on a shell buffer: use prompt end. |