From 5d977b968c5d55470daa337df52ca2689d434e3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Fri, 14 Nov 2014 02:29:40 -0300 Subject: [PATCH] * lisp/progmodes/python.el (python-shell-completion-get-completions): Fix previous merge. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/python.el | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7bec543fd4d..9c673c861d9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-14 Fabián Ezequiel Gallina + + * progmodes/python.el (python-shell-completion-get-completions): + Fix previous merge. + 2014-11-14 Lars Magne Ingebrigtsen * net/eww.el (eww-render): Don't set the title to the URL. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index b230992fc98..dfefe837569 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2886,13 +2886,9 @@ When IMPORT is non-nil takes precedence over INPUT for completion." (with-current-buffer (process-buffer process) (let* ((prompt - ;; Get last prompt of the inferior process buffer (this - ;; intentionally avoids using `comint-last-prompt' because - ;; of incompatibilities with Emacs 24.x). - (save-excursion + (let ((prompt-boundaries (python-util-comint-last-prompt))) (buffer-substring-no-properties - (line-beginning-position) ;End of prompt. - (re-search-backward "^")))) + (car prompt-boundaries) (cdr prompt-boundaries)))) (completion-code ;; Check whether a prompt matches a pdb string, an import ;; statement or just the standard prompt and use the -- 2.11.4.GIT