diff options
| -rw-r--r-- | lisp/progmodes/python.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 47bdef2c928..ce6382cf225 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | ;; python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " | 79 | ;; python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " |
| 80 | ;; python-shell-completion-setup-code | 80 | ;; python-shell-completion-setup-code |
| 81 | ;; "from IPython.core.completerlib import module_completion" | 81 | ;; "from IPython.core.completerlib import module_completion" |
| 82 | ;; python-shell-module-completion-string-code | 82 | ;; python-shell-completion-module-string-code |
| 83 | ;; "';'.join(module_completion('''%s'''))\n" | 83 | ;; "';'.join(module_completion('''%s'''))\n" |
| 84 | ;; python-shell-completion-string-code | 84 | ;; python-shell-completion-string-code |
| 85 | ;; "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") | 85 | ;; "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") |
| @@ -1296,7 +1296,7 @@ controls which Python interpreter is run. Variables | |||
| 1296 | `python-shell-prompt-block-regexp', | 1296 | `python-shell-prompt-block-regexp', |
| 1297 | `python-shell-completion-setup-code', | 1297 | `python-shell-completion-setup-code', |
| 1298 | `python-shell-completion-string-code', | 1298 | `python-shell-completion-string-code', |
| 1299 | `python-shell-module-completion-string-code', | 1299 | `python-shell-completion-module-string-code', |
| 1300 | `python-eldoc-setup-code', `python-eldoc-string-code', | 1300 | `python-eldoc-setup-code', `python-eldoc-string-code', |
| 1301 | `python-ffap-setup-code' and `python-ffap-string-code' can | 1301 | `python-ffap-setup-code' and `python-ffap-string-code' can |
| 1302 | customize this mode for different Python interpreters. | 1302 | customize this mode for different Python interpreters. |
| @@ -1594,7 +1594,7 @@ else: | |||
| 1594 | :group 'python | 1594 | :group 'python |
| 1595 | :safe 'stringp) | 1595 | :safe 'stringp) |
| 1596 | 1596 | ||
| 1597 | (defcustom python-shell-module-completion-string-code "" | 1597 | (defcustom python-shell-completion-module-string-code "" |
| 1598 | "Python code used to get completions separated by semicolons for imports. | 1598 | "Python code used to get completions separated by semicolons for imports. |
| 1599 | 1599 | ||
| 1600 | For IPython v0.11, add the following line to | 1600 | For IPython v0.11, add the following line to |
| @@ -1609,7 +1609,7 @@ and use the following as the value of this variable: | |||
| 1609 | :group 'python | 1609 | :group 'python |
| 1610 | :safe 'stringp) | 1610 | :safe 'stringp) |
| 1611 | 1611 | ||
| 1612 | (defvar python-completion-original-window-configuration nil) | 1612 | (defvar python-shell-completion-original-window-configuration nil) |
| 1613 | 1613 | ||
| 1614 | (defun python-shell-completion--get-completions (input process completion-code) | 1614 | (defun python-shell-completion--get-completions (input process completion-code) |
| 1615 | "Retrieve available completions for INPUT using PROCESS. | 1615 | "Retrieve available completions for INPUT using PROCESS. |
| @@ -1629,10 +1629,10 @@ completions on the current context." | |||
| 1629 | (input (substring-no-properties | 1629 | (input (substring-no-properties |
| 1630 | (or (comint-word (current-word)) "") nil nil)) | 1630 | (or (comint-word (current-word)) "") nil nil)) |
| 1631 | (completions | 1631 | (completions |
| 1632 | (if (and (> (length python-shell-module-completion-string-code) 0) | 1632 | (if (and (> (length python-shell-completion-module-string-code) 0) |
| 1633 | (string-match "^\\(from\\|import\\)[ \t]" line)) | 1633 | (string-match "^\\(from\\|import\\)[ \t]" line)) |
| 1634 | (python-shell-completion--get-completions | 1634 | (python-shell-completion--get-completions |
| 1635 | line process python-shell-module-completion-string-code) | 1635 | line process python-shell-completion-module-string-code) |
| 1636 | (and (> (length input) 0) | 1636 | (and (> (length input) 0) |
| 1637 | (python-shell-completion--get-completions | 1637 | (python-shell-completion--get-completions |
| 1638 | input process python-shell-completion-string-code)))) | 1638 | input process python-shell-completion-string-code)))) |
| @@ -1640,10 +1640,10 @@ completions on the current context." | |||
| 1640 | (try-completion input completions)))) | 1640 | (try-completion input completions)))) |
| 1641 | (cond ((eq completion t) | 1641 | (cond ((eq completion t) |
| 1642 | (if (eq this-command last-command) | 1642 | (if (eq this-command last-command) |
| 1643 | (when python-completion-original-window-configuration | 1643 | (when python-shell-completion-original-window-configuration |
| 1644 | (set-window-configuration | 1644 | (set-window-configuration |
| 1645 | python-completion-original-window-configuration))) | 1645 | python-shell-completion-original-window-configuration))) |
| 1646 | (setq python-completion-original-window-configuration nil) | 1646 | (setq python-shell-completion-original-window-configuration nil) |
| 1647 | t) | 1647 | t) |
| 1648 | ((null completion) | 1648 | ((null completion) |
| 1649 | (message "Can't find completion for \"%s\"" input) | 1649 | (message "Can't find completion for \"%s\"" input) |
| @@ -1654,8 +1654,8 @@ completions on the current context." | |||
| 1654 | (insert completion) | 1654 | (insert completion) |
| 1655 | t)) | 1655 | t)) |
| 1656 | (t | 1656 | (t |
| 1657 | (unless python-completion-original-window-configuration | 1657 | (unless python-shell-completion-original-window-configuration |
| 1658 | (setq python-completion-original-window-configuration | 1658 | (setq python-shell-completion-original-window-configuration |
| 1659 | (current-window-configuration))) | 1659 | (current-window-configuration))) |
| 1660 | (with-output-to-temp-buffer "*Python Completions*" | 1660 | (with-output-to-temp-buffer "*Python Completions*" |
| 1661 | (display-completion-list | 1661 | (display-completion-list |