diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 7 |
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))) |