1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-03 11:33:37 +00:00

Make python-shell-completion--do-completion-at-point' work for calls done via python-completion-complete-at-point'.

The comint prompt retrieval logic was failing on
`python-shell-completion--do-completion-at-point' when calls to it
happened from outside the process buffer.
This commit is contained in:
Fabián Ezequiel Gallina 2012-05-17 00:03:36 -03:00 committed by Fabián Ezequiel Gallina
parent cd1ed6c8f4
commit 394f09a38f

View File

@ -1726,9 +1726,11 @@ completions on the current context."
(buffer-substring (point-at-bol) (point)) nil nil))
(input (substring-no-properties
(or (comint-word (current-word)) "") nil nil))
(prompt (buffer-substring-no-properties
(overlay-start comint-last-prompt-overlay)
(overlay-end comint-last-prompt-overlay)))
(prompt
(with-current-buffer (process-buffer process)
(buffer-substring-no-properties
(overlay-start comint-last-prompt-overlay)
(overlay-end comint-last-prompt-overlay))))
(completion-code
(cond ((and (> (length python-shell-completion-pdb-string-code) 0)
(string-match