aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina2014-10-12 12:12:04 -0300
committerFabián Ezequiel Gallina2014-10-12 12:12:04 -0300
commitb1be0eda33b545a25c2dc2cf8425c6f3fbf0c464 (patch)
tree5ca507fa1585d755563fa58eab524fdbc4a31109 /lisp/progmodes/python.el
parenta9789a1d8c20a0f5b889930a808bc234c443b7ef (diff)
downloademacs-b1be0eda33b545a25c2dc2cf8425c6f3fbf0c464.tar.gz
emacs-b1be0eda33b545a25c2dc2cf8425c6f3fbf0c464.zip
Fix import completion.
* lisp/progmodes/python.el (python-shell-completion-get-completions): Fix import case regexp. Fixes: debbugs:18582
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el7
1 files changed, 2 insertions, 5 deletions
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."
2695 (save-excursion 2695 (save-excursion
2696 (buffer-substring-no-properties 2696 (buffer-substring-no-properties
2697 (line-beginning-position) ;End of prompt. 2697 (line-beginning-position) ;End of prompt.
2698 (progn 2698 (re-search-backward "^"))))
2699 (re-search-backward "^")
2700 (python-util-forward-comment) ;FIXME: Why?
2701 (point)))))
2702 (completion-code 2699 (completion-code
2703 ;; Check whether a prompt matches a pdb string, an import 2700 ;; Check whether a prompt matches a pdb string, an import
2704 ;; statement or just the standard prompt and use the 2701 ;; 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."
2713 (t nil))) 2710 (t nil)))
2714 (input 2711 (input
2715 (if (string-match 2712 (if (string-match
2716 (python-rx (+ space) (or "from" "import") space) 2713 (python-rx line-start (* space) (or "from" "import") space)
2717 line) 2714 line)
2718 line 2715 line
2719 input))) 2716 input)))