diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 3f363f960ed..ad2d47b2b24 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -51,10 +51,10 @@ | |||
| 51 | ;; block of code of your current buffer in an inferior Python process. | 51 | ;; block of code of your current buffer in an inferior Python process. |
| 52 | 52 | ||
| 53 | ;; Shell completion: hitting tab will try to complete the current | 53 | ;; Shell completion: hitting tab will try to complete the current |
| 54 | ;; word. Shell completion is implemented in a manner that if you | 54 | ;; word. Shell completion is implemented in a manner that if you |
| 55 | ;; change the `python-shell-interpreter' to any other (for example | 55 | ;; change the `python-shell-interpreter' to any other (for example |
| 56 | ;; IPython) it should be easy to integrate another way to calculate | 56 | ;; IPython) it should be easy to integrate another way to calculate |
| 57 | ;; completions. You just need to especify your custom | 57 | ;; completions. You just need to especify your custom |
| 58 | ;; `python-shell-completion-setup-code' and | 58 | ;; `python-shell-completion-setup-code' and |
| 59 | ;; `python-shell-completion-strings-code' | 59 | ;; `python-shell-completion-strings-code' |
| 60 | 60 | ||
| @@ -62,12 +62,12 @@ | |||
| 62 | ;; call to pdb (or ipdb) it will prompt the block of code and will | 62 | ;; call to pdb (or ipdb) it will prompt the block of code and will |
| 63 | ;; follow the execution of pdb marking the current line with an arrow. | 63 | ;; follow the execution of pdb marking the current line with an arrow. |
| 64 | 64 | ||
| 65 | ;; Symbol completion: you can complete the symbol at point. It uses | 65 | ;; Symbol completion: you can complete the symbol at point. It uses |
| 66 | ;; the shell completion in background so you should run | 66 | ;; the shell completion in background so you should run |
| 67 | ;; `python-shell-send-buffer' from time to time to get better results. | 67 | ;; `python-shell-send-buffer' from time to time to get better results. |
| 68 | 68 | ||
| 69 | ;; Eldoc: returns documentation for object at point by using the | 69 | ;; Eldoc: returns documentation for object at point by using the |
| 70 | ;; inferior python subprocess to inspect its documentation. As you | 70 | ;; inferior python subprocess to inspect its documentation. As you |
| 71 | ;; might guessed you should run `python-shell-send-buffer' from time | 71 | ;; might guessed you should run `python-shell-send-buffer' from time |
| 72 | ;; to time to get better results too. | 72 | ;; to time to get better results too. |
| 73 | 73 | ||
| @@ -193,7 +193,7 @@ | |||
| 193 | ">>=" "<<=" "&=" "^=" "|="))))) | 193 | ">>=" "<<=" "&=" "^=" "|="))))) |
| 194 | 194 | ||
| 195 | (defmacro python-rx (&rest regexps) | 195 | (defmacro python-rx (&rest regexps) |
| 196 | "Python mode especialized rx macro which supports common python named regexps." | 196 | "Python mode especialized rx macro which supports common python named REGEXPS." |
| 197 | (let ((rx-constituents (append python-rx-constituents rx-constituents))) | 197 | (let ((rx-constituents (append python-rx-constituents rx-constituents))) |
| 198 | (cond ((null regexps) | 198 | (cond ((null regexps) |
| 199 | (error "No regexp")) | 199 | (error "No regexp")) |
| @@ -1069,7 +1069,7 @@ When argument ARG is non-nil sends the innermost defun." | |||
| 1069 | (progn (end-of-line) (point-marker))))))) | 1069 | (progn (end-of-line) (point-marker))))))) |
| 1070 | 1070 | ||
| 1071 | (defun python-shell-send-file (file-name &optional process) | 1071 | (defun python-shell-send-file (file-name &optional process) |
| 1072 | "Send FILE-NAME to inferior Python process." | 1072 | "Send FILE-NAME to inferior Python PROCESS." |
| 1073 | (interactive "fFile to send: ") | 1073 | (interactive "fFile to send: ") |
| 1074 | (let ((process (or process (python-shell-get-or-create-process))) | 1074 | (let ((process (or process (python-shell-get-or-create-process))) |
| 1075 | (full-file-name (expand-file-name file-name))) | 1075 | (full-file-name (expand-file-name file-name))) |
| @@ -1295,7 +1295,7 @@ inferior python process is updated properly." | |||
| 1295 | (interactive) | 1295 | (interactive) |
| 1296 | (let ((process (python-shell-get-process))) | 1296 | (let ((process (python-shell-get-process))) |
| 1297 | (if (not process) | 1297 | (if (not process) |
| 1298 | (error "Completion needs an inferior Python process running.") | 1298 | (error "Completion needs an inferior Python process running") |
| 1299 | (let* ((input (when (comint-word (current-word)) | 1299 | (let* ((input (when (comint-word (current-word)) |
| 1300 | (with-syntax-table python-dotty-syntax-table | 1300 | (with-syntax-table python-dotty-syntax-table |
| 1301 | (buffer-substring (point-marker) | 1301 | (buffer-substring (point-marker) |
| @@ -1351,7 +1351,8 @@ inferior python process is updated properly." | |||
| 1351 | "`fill-paragraph-function' handling multi-line strings and possibly comments. | 1351 | "`fill-paragraph-function' handling multi-line strings and possibly comments. |
| 1352 | If any of the current line is in or at the end of a multi-line string, | 1352 | If any of the current line is in or at the end of a multi-line string, |
| 1353 | fill the string or the paragraph of it that point is in, preserving | 1353 | fill the string or the paragraph of it that point is in, preserving |
| 1354 | the string's indentation." | 1354 | the string's indentation. |
| 1355 | Optional argument JUSTIFY defines if the paragraph should be justified." | ||
| 1355 | (interactive "P") | 1356 | (interactive "P") |
| 1356 | (save-excursion | 1357 | (save-excursion |
| 1357 | (back-to-indentation) | 1358 | (back-to-indentation) |