Commit b1be0eda authored by Fabián Ezequiel Gallina's avatar Fabián Ezequiel Gallina
Browse files

Fix import completion.

* lisp/progmodes/python.el (python-shell-completion-get-completions):
Fix import case regexp.

Fixes: debbugs:18582
parent a9789a1d
2014-10-12 Fabián Ezequiel Gallina <fgallina@gnu.org>
Fix import completion. (Bug#18582)
* progmodes/python.el (python-shell-completion-get-completions):
Fix import case regexp.
2014-10-10 Stefan Monnier <monnier@iro.umontreal.ca> 2014-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
   
* progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo * progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo
......
...@@ -2695,10 +2695,7 @@ LINE is used to detect the context on how to complete given INPUT." ...@@ -2695,10 +2695,7 @@ LINE is used to detect the context on how to complete given INPUT."
(save-excursion (save-excursion
(buffer-substring-no-properties (buffer-substring-no-properties
(line-beginning-position) ;End of prompt. (line-beginning-position) ;End of prompt.
(progn (re-search-backward "^"))))
(re-search-backward "^")
(python-util-forward-comment) ;FIXME: Why?
(point)))))
(completion-code (completion-code
;; Check whether a prompt matches a pdb string, an import ;; Check whether a prompt matches a pdb string, an import
;; statement or just the standard prompt and use the ;; 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,7 +2710,7 @@ LINE is used to detect the context on how to complete given INPUT."
(t nil))) (t nil)))
(input (input
(if (string-match (if (string-match
(python-rx (+ space) (or "from" "import") space) (python-rx line-start (* space) (or "from" "import") space)
line) line)
line line
input))) input)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment