diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 680b57fc3ef..0de76b0bde3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -4069,7 +4069,8 @@ With argument MSG show activation/deactivation message." | |||
| 4069 | Optional argument PROCESS forces completions to be retrieved | 4069 | Optional argument PROCESS forces completions to be retrieved |
| 4070 | using that one instead of current buffer's process." | 4070 | using that one instead of current buffer's process." |
| 4071 | (setq process (or process (get-buffer-process (current-buffer)))) | 4071 | (setq process (or process (get-buffer-process (current-buffer)))) |
| 4072 | (let* ((line-start (if (derived-mode-p 'inferior-python-mode) | 4072 | (let* ((is-shell-buffer (derived-mode-p 'inferior-python-mode)) |
| 4073 | (line-start (if is-shell-buffer | ||
| 4073 | ;; Working on a shell buffer: use prompt end. | 4074 | ;; Working on a shell buffer: use prompt end. |
| 4074 | (cdr (python-util-comint-last-prompt)) | 4075 | (cdr (python-util-comint-last-prompt)) |
| 4075 | (line-beginning-position))) | 4076 | (line-beginning-position))) |
| @@ -4100,7 +4101,8 @@ using that one instead of current buffer's process." | |||
| 4100 | (completion-fn | 4101 | (completion-fn |
| 4101 | (with-current-buffer (process-buffer process) | 4102 | (with-current-buffer (process-buffer process) |
| 4102 | (cond ((or (null prompt) | 4103 | (cond ((or (null prompt) |
| 4103 | (< (point) (cdr prompt-boundaries))) | 4104 | (and is-shell-buffer |
| 4105 | (< (point) (cdr prompt-boundaries)))) | ||
| 4104 | #'ignore) | 4106 | #'ignore) |
| 4105 | ((or (not python-shell-completion-native-enable) | 4107 | ((or (not python-shell-completion-native-enable) |
| 4106 | ;; Even if native completion is enabled, for | 4108 | ;; Even if native completion is enabled, for |