From: Fabián Ezequiel Gallina Date: Fri, 14 Nov 2014 05:29:40 +0000 (-0300) Subject: * lisp/progmodes/python.el (python-shell-completion-get-completions): X-Git-Tag: emacs-25.0.90~2635^2~477 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d977b968c5d55470daa337df52ca2689d434e3c;p=emacs.git * lisp/progmodes/python.el (python-shell-completion-get-completions): Fix previous merge. --- 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