aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/python.el7
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2abbf728ba5..9ec8c94fec3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12014-10-12 Fabián Ezequiel Gallina <fgallina@gnu.org>
2
3 Fix import completion. (Bug#18582)
4 * progmodes/python.el (python-shell-completion-get-completions):
5 Fix import case regexp.
6
12014-10-10 Stefan Monnier <monnier@iro.umontreal.ca> 72014-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo 9 * progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo
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)))