diff options
author | Fabián Ezequiel Gallina <fgallina@gnu.org> | 2014-10-12 12:12:04 -0300 |
---|---|---|
committer | Fabián Ezequiel Gallina <fgallina@gnu.org> | 2014-10-12 12:12:04 -0300 |
commit | b1be0eda33b545a25c2dc2cf8425c6f3fbf0c464 (patch) | |
tree | 5ca507fa1585d755563fa58eab524fdbc4a31109 | |
parent | a9789a1d8c20a0f5b889930a808bc234c443b7ef (diff) | |
download | emacs-b1be0eda33b545a25c2dc2cf8425c6f3fbf0c464.tar.gz |
Fix import completion.
* lisp/progmodes/python.el (python-shell-completion-get-completions):
Fix import case regexp.
Fixes: debbugs:18582
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/progmodes/python.el | 7 |
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 @@ +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> * 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." (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))) |