]> git.eshelyaron.com Git - emacs.git/commitdiff
; Check process in 'python-shell-completion-at-point'
authorLin Sun <sunlin7@hotmail.com>
Wed, 1 May 2024 06:55:31 +0000 (06:55 +0000)
committerEshel Yaron <me@eshelyaron.com>
Fri, 10 May 2024 13:35:04 +0000 (15:35 +0200)
* lisp/progmodes/python.el (python-shell-completion-at-point):
Check the PROCESS argument at the beginning of the function.
(Bug#70707)

(cherry picked from commit 751e21af42e905d0448baa7be4a7ae6d6ae6734a)

lisp/progmodes/python.el

index 0bee98871e4179b666980101b7a8b7df6539f8c7..831bec7f4af860ae3e04e2c077d668e5d756d490 100644 (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.