]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix import completion.
authorFabián Ezequiel Gallina <fgallina@gnu.org>
Sun, 12 Oct 2014 15:12:04 +0000 (12:12 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Sun, 12 Oct 2014 15:12:04 +0000 (12:12 -0300)
* lisp/progmodes/python.el (python-shell-completion-get-completions):
Fix import case regexp.

Fixes: debbugs:18582
lisp/ChangeLog
lisp/progmodes/python.el

index 2abbf728ba517902831a41d749f3c2a5f3c0bd19..9ec8c94fec30aa7e9eaf186cc67c913ddaa8f2ef 100644 (file)
@@ -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
index aa9d9b10dbc88aee4d30b0b07345d9818711420e..a564acc3075eebd3f6ba4bfd4c6709530f74aa23 100644 (file)
@@ -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)))