diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 544cb2225cd..9ca11acfce8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -407,7 +407,7 @@ comments and strings, or that point is within brackets/parens." | |||
| 407 | (error nil)))))))) | 407 | (error nil)))))))) |
| 408 | 408 | ||
| 409 | (defun python-comment-line-p () | 409 | (defun python-comment-line-p () |
| 410 | "Return non-nil iff current line has only a comment." | 410 | "Return non-nil if and only if current line has only a comment." |
| 411 | (save-excursion | 411 | (save-excursion |
| 412 | (end-of-line) | 412 | (end-of-line) |
| 413 | (when (eq 'comment (syntax-ppss-context (syntax-ppss))) | 413 | (when (eq 'comment (syntax-ppss-context (syntax-ppss))) |
| @@ -415,7 +415,7 @@ comments and strings, or that point is within brackets/parens." | |||
| 415 | (looking-at (rx (or (syntax comment-start) line-end)))))) | 415 | (looking-at (rx (or (syntax comment-start) line-end)))))) |
| 416 | 416 | ||
| 417 | (defun python-blank-line-p () | 417 | (defun python-blank-line-p () |
| 418 | "Return non-nil iff current line is blank." | 418 | "Return non-nil if and only if current line is blank." |
| 419 | (save-excursion | 419 | (save-excursion |
| 420 | (beginning-of-line) | 420 | (beginning-of-line) |
| 421 | (looking-at "\\s-*$"))) | 421 | (looking-at "\\s-*$"))) |
| @@ -995,7 +995,7 @@ multi-line bracketed expressions." | |||
| 995 | "Skip out of any nested brackets. | 995 | "Skip out of any nested brackets. |
| 996 | Skip forward if FORWARD is non-nil, else backward. | 996 | Skip forward if FORWARD is non-nil, else backward. |
| 997 | If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. | 997 | If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. |
| 998 | Return non-nil iff skipping was done." | 998 | Return non-nil if and only if skipping was done." |
| 999 | (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) | 999 | (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) |
| 1000 | (forward (if forward -1 1))) | 1000 | (forward (if forward -1 1))) |
| 1001 | (unless (zerop depth) | 1001 | (unless (zerop depth) |
| @@ -1805,10 +1805,9 @@ This is a no-op if `python-check-comint-prompt' returns nil." | |||
| 1805 | (kill-local-variable 'python-preoutput-result)))))) | 1805 | (kill-local-variable 'python-preoutput-result)))))) |
| 1806 | 1806 | ||
| 1807 | (defun python-check-comint-prompt (&optional proc) | 1807 | (defun python-check-comint-prompt (&optional proc) |
| 1808 | "Return non-nil iff there's a normal prompt in the inferior buffer. | 1808 | "Return non-nil if and only if there's a normal prompt in the inferior buffer. |
| 1809 | If there isn't, it's probably not appropriate to send input to return | 1809 | If there isn't, it's probably not appropriate to send input to return Eldoc |
| 1810 | Eldoc information etc. If PROC is non-nil, check the buffer for that | 1810 | information etc. If PROC is non-nil, check the buffer for that process." |
| 1811 | process." | ||
| 1812 | (with-current-buffer (process-buffer (or proc (python-proc))) | 1811 | (with-current-buffer (process-buffer (or proc (python-proc))) |
| 1813 | (save-excursion | 1812 | (save-excursion |
| 1814 | (save-match-data (re-search-backward ">>> \\=" nil t))))) | 1813 | (save-match-data (re-search-backward ">>> \\=" nil t))))) |