diff options
| author | Glenn Morris | 2014-10-12 15:56:45 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-10-12 15:56:45 -0700 |
| commit | b1d5ab0352b6132eee4feaf9091ce7dc7a3e6a84 (patch) | |
| tree | df2e6708c30f53f071bd824c49c7f00dfbe0ffba /lisp/progmodes/python.el | |
| parent | ec11ab9b783fc1f2c0ce858a711baa5f728c238b (diff) | |
| parent | e175fabcdd37f89db13ab90615cf0baa7bade4d9 (diff) | |
| download | emacs-b1d5ab0352b6132eee4feaf9091ce7dc7a3e6a84.tar.gz emacs-b1d5ab0352b6132eee4feaf9091ce7dc7a3e6a84.zip | |
Merge from emacs-24; up to 2014-07-26T11:58:24Z!schwab@linux-m68k.org
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index dfefe837569..b230992fc98 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2886,9 +2886,13 @@ When IMPORT is non-nil takes precedence over INPUT for | |||
| 2886 | completion." | 2886 | completion." |
| 2887 | (with-current-buffer (process-buffer process) | 2887 | (with-current-buffer (process-buffer process) |
| 2888 | (let* ((prompt | 2888 | (let* ((prompt |
| 2889 | (let ((prompt-boundaries (python-util-comint-last-prompt))) | 2889 | ;; Get last prompt of the inferior process buffer (this |
| 2890 | ;; intentionally avoids using `comint-last-prompt' because | ||
| 2891 | ;; of incompatibilities with Emacs 24.x). | ||
| 2892 | (save-excursion | ||
| 2890 | (buffer-substring-no-properties | 2893 | (buffer-substring-no-properties |
| 2891 | (car prompt-boundaries) (cdr prompt-boundaries)))) | 2894 | (line-beginning-position) ;End of prompt. |
| 2895 | (re-search-backward "^")))) | ||
| 2892 | (completion-code | 2896 | (completion-code |
| 2893 | ;; Check whether a prompt matches a pdb string, an import | 2897 | ;; Check whether a prompt matches a pdb string, an import |
| 2894 | ;; statement or just the standard prompt and use the | 2898 | ;; statement or just the standard prompt and use the |