diff options
| author | kobarity | 2023-03-05 17:07:17 +0900 |
|---|---|---|
| committer | Eli Zaretskii | 2023-03-09 12:14:15 +0200 |
| commit | 6fe9075ff3814ce825c9869c901903edad9d0b44 (patch) | |
| tree | 2ccde29bba0fabb1a64763dcc41bce414be84f87 /lisp/progmodes/python.el | |
| parent | f175141aeade5d6795d22d40c1eb001c6ba49025 (diff) | |
| download | emacs-6fe9075ff3814ce825c9869c901903edad9d0b44.tar.gz emacs-6fe9075ff3814ce825c9869c901903edad9d0b44.zip | |
Revert workaround introduced in Bug#56271
* lisp/progmodes/python.el (python-nav-end-of-statement)
(python-nav-end-of-block): Revert workaround introduced in Bug#56271
as the bug is fixedin Bug#58780.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ccf78e13148..5b11d204de1 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2062,10 +2062,6 @@ of the statement." | |||
| 2062 | ;; are somehow out of whack. This has been | 2062 | ;; are somehow out of whack. This has been |
| 2063 | ;; observed when using `syntax-ppss' during | 2063 | ;; observed when using `syntax-ppss' during |
| 2064 | ;; narrowing. | 2064 | ;; narrowing. |
| 2065 | ;; It can also fail in cases where the buffer is in | ||
| 2066 | ;; the process of being modified, e.g. when creating | ||
| 2067 | ;; a string with `electric-pair-mode' disabled such | ||
| 2068 | ;; that there can be an unmatched single quote | ||
| 2069 | (when (>= string-start last-string-end) | 2065 | (when (>= string-start last-string-end) |
| 2070 | (goto-char string-start) | 2066 | (goto-char string-start) |
| 2071 | (if (python-syntax-context 'paren) | 2067 | (if (python-syntax-context 'paren) |
| @@ -2154,10 +2150,7 @@ backward to previous statement." | |||
| 2154 | (while (and (forward-line 1) | 2150 | (while (and (forward-line 1) |
| 2155 | (not (eobp)) | 2151 | (not (eobp)) |
| 2156 | (or (and (> (current-indentation) block-indentation) | 2152 | (or (and (> (current-indentation) block-indentation) |
| 2157 | (let ((start (point))) | 2153 | (or (python-nav-end-of-statement) t)) |
| 2158 | (python-nav-end-of-statement) | ||
| 2159 | ;; must move forward otherwise infinite loop | ||
| 2160 | (> (point) start))) | ||
| 2161 | (python-info-current-line-comment-p) | 2154 | (python-info-current-line-comment-p) |
| 2162 | (python-info-current-line-empty-p)))) | 2155 | (python-info-current-line-empty-p)))) |
| 2163 | (python-util-forward-comment -1) | 2156 | (python-util-forward-comment -1) |