From b1be0eda33b545a25c2dc2cf8425c6f3fbf0c464 Mon Sep 17 00:00:00 2001 From: Fabián Ezequiel Gallina Date: Sun, 12 Oct 2014 12:12:04 -0300 Subject: Fix import completion. * lisp/progmodes/python.el (python-shell-completion-get-completions): Fix import case regexp. Fixes: debbugs:18582 --- lisp/progmodes/python.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lisp/progmodes/python.el') diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index aa9d9b10dbc..a564acc3075 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2695,10 +2695,7 @@ LINE is used to detect the context on how to complete given INPUT." (save-excursion (buffer-substring-no-properties (line-beginning-position) ;End of prompt. - (progn - (re-search-backward "^") - (python-util-forward-comment) ;FIXME: Why? - (point))))) + (re-search-backward "^")))) (completion-code ;; Check whether a prompt matches a pdb string, an import ;; statement or just the standard prompt and use the @@ -2713,7 +2710,7 @@ LINE is used to detect the context on how to complete given INPUT." (t nil))) (input (if (string-match - (python-rx (+ space) (or "from" "import") space) + (python-rx line-start (* space) (or "from" "import") space) line) line input))) -- cgit v1.2.1