[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114094: * progmodes/python.el (python-shell-complet
From: |
Fabián Ezequiel Gallina |
Subject: |
[Emacs-diffs] trunk r114094: * progmodes/python.el (python-shell-completion-get-completions): |
Date: |
Mon, 02 Sep 2013 03:21:17 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114094
revision-id: address@hidden
parent: address@hidden
committer: Fabián Ezequiel Gallina <address@hidden>
branch nick: trunk
timestamp: Mon 2013-09-02 00:21:13 -0300
message:
* progmodes/python.el (python-shell-completion-get-completions):
Drop use of deleted `comint-last-prompt-overlay'.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/python.el python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-01 02:12:32 +0000
+++ b/lisp/ChangeLog 2013-09-02 03:21:13 +0000
@@ -1,3 +1,8 @@
+2013-09-02 Fabián Ezequiel Gallina <address@hidden>
+
+ * progmodes/python.el (python-shell-completion-get-completions):
+ Drop use of deleted `comint-last-prompt-overlay'.
+
2013-09-01 Glenn Morris <address@hidden>
* Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2013-08-27 02:41:41 +0000
+++ b/lisp/progmodes/python.el 2013-09-02 03:21:13 +0000
@@ -2266,13 +2266,17 @@
LINE is used to detect the context on how to complete given
INPUT."
(let* ((prompt
- ;; Get the last prompt for the inferior process
- ;; buffer. This is used for the completion code selection
- ;; heuristic.
+ ;; Get last prompt of the inferior process buffer (this
+ ;; intentionally avoids using `comint-last-prompt' because
+ ;; of incompatibilities with Emacs 24.x).
(with-current-buffer (process-buffer process)
- (buffer-substring-no-properties
- (overlay-start comint-last-prompt-overlay)
- (overlay-end comint-last-prompt-overlay))))
+ (save-excursion
+ (buffer-substring-no-properties
+ (- (point) (length line))
+ (progn
+ (re-search-backward "^")
+ (python-util-forward-comment)
+ (point))))))
(completion-context
;; Check whether a prompt matches a pdb string, an import
;; statement or just the standard prompt and use the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114094: * progmodes/python.el (python-shell-completion-get-completions):,
Fabián Ezequiel Gallina <=