diff options
| author | Fabián Ezequiel Gallina | 2013-09-02 00:21:13 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2013-09-02 00:21:13 -0300 |
| commit | cd16c5f1f5db8cfc6895288889fd9f5b376bfc41 (patch) | |
| tree | a6d20c2f61420803dc2431085cea2e3857341397 | |
| parent | a892a94c4271d1d057ae65a1c63441c9eb0a2e5a (diff) | |
| download | emacs-cd16c5f1f5db8cfc6895288889fd9f5b376bfc41.tar.gz emacs-cd16c5f1f5db8cfc6895288889fd9f5b376bfc41.zip | |
* progmodes/python.el (python-shell-completion-get-completions):
Drop use of deleted `comint-last-prompt-overlay'.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be8caf189d2..b48ff2f5030 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/python.el (python-shell-completion-get-completions): | ||
| 4 | Drop use of deleted `comint-last-prompt-overlay'. | ||
| 5 | |||
| 1 | 2013-09-01 Glenn Morris <rgm@gnu.org> | 6 | 2013-09-01 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Makefile.in (setwins, setwins_almost, setwins_for_subdirs): | 8 | * Makefile.in (setwins, setwins_almost, setwins_for_subdirs): |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 7004836e69f..b8e2f4c8de9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2266,13 +2266,17 @@ and use the following as the value of this variable: | |||
| 2266 | LINE is used to detect the context on how to complete given | 2266 | LINE is used to detect the context on how to complete given |
| 2267 | INPUT." | 2267 | INPUT." |
| 2268 | (let* ((prompt | 2268 | (let* ((prompt |
| 2269 | ;; Get the last prompt for the inferior process | 2269 | ;; Get last prompt of the inferior process buffer (this |
| 2270 | ;; buffer. This is used for the completion code selection | 2270 | ;; intentionally avoids using `comint-last-prompt' because |
| 2271 | ;; heuristic. | 2271 | ;; of incompatibilities with Emacs 24.x). |
| 2272 | (with-current-buffer (process-buffer process) | 2272 | (with-current-buffer (process-buffer process) |
| 2273 | (buffer-substring-no-properties | 2273 | (save-excursion |
| 2274 | (overlay-start comint-last-prompt-overlay) | 2274 | (buffer-substring-no-properties |
| 2275 | (overlay-end comint-last-prompt-overlay)))) | 2275 | (- (point) (length line)) |
| 2276 | (progn | ||
| 2277 | (re-search-backward "^") | ||
| 2278 | (python-util-forward-comment) | ||
| 2279 | (point)))))) | ||
| 2276 | (completion-context | 2280 | (completion-context |
| 2277 | ;; Check whether a prompt matches a pdb string, an import | 2281 | ;; Check whether a prompt matches a pdb string, an import |
| 2278 | ;; statement or just the standard prompt and use the | 2282 | ;; statement or just the standard prompt and use the |