diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:36 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:36 -0300 |
| commit | 394f09a38f7cdb3138ed3dc778b702ab4ab3a2ba (patch) | |
| tree | b657f1ed414467e6496d25fcd109fa90a737aa0b /lisp/progmodes/python.el | |
| parent | cd1ed6c8f4a50c0bc499bdcf78bbd4e39bdfc4d2 (diff) | |
| download | emacs-394f09a38f7cdb3138ed3dc778b702ab4ab3a2ba.tar.gz emacs-394f09a38f7cdb3138ed3dc778b702ab4ab3a2ba.zip | |
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.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 7f4aa940d8d..cfc15c7d040 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1726,9 +1726,11 @@ completions on the current context." | |||
| 1726 | (buffer-substring (point-at-bol) (point)) nil nil)) | 1726 | (buffer-substring (point-at-bol) (point)) nil nil)) |
| 1727 | (input (substring-no-properties | 1727 | (input (substring-no-properties |
| 1728 | (or (comint-word (current-word)) "") nil nil)) | 1728 | (or (comint-word (current-word)) "") nil nil)) |
| 1729 | (prompt (buffer-substring-no-properties | 1729 | (prompt |
| 1730 | (overlay-start comint-last-prompt-overlay) | 1730 | (with-current-buffer (process-buffer process) |
| 1731 | (overlay-end comint-last-prompt-overlay))) | 1731 | (buffer-substring-no-properties |
| 1732 | (overlay-start comint-last-prompt-overlay) | ||
| 1733 | (overlay-end comint-last-prompt-overlay)))) | ||
| 1732 | (completion-code | 1734 | (completion-code |
| 1733 | (cond ((and (> (length python-shell-completion-pdb-string-code) 0) | 1735 | (cond ((and (> (length python-shell-completion-pdb-string-code) 0) |
| 1734 | (string-match | 1736 | (string-match |