diff options
| author | kobarity | 2022-07-23 10:26:33 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-07-23 10:26:33 +0200 |
| commit | 09e433ec7f8b2c25d5be2cdb5aac5e089a6e4cea (patch) | |
| tree | 256a15b13364bb32416092548a9195256444faa0 /lisp/progmodes/python.el | |
| parent | df667e9f17a071a6471f629d994f6298c2ec0a9d (diff) | |
| download | emacs-09e433ec7f8b2c25d5be2cdb5aac5e089a6e4cea.tar.gz emacs-09e433ec7f8b2c25d5be2cdb5aac5e089a6e4cea.zip | |
Fix Python navigation problem with a line continuation using backslash
* lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix
line continuation using backslash in nested defun (bug#56615).
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f31832fec9c..ec7d6572200 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1459,8 +1459,11 @@ With positive ARG search backwards, else search forwards." | |||
| 1459 | (current-indentation))) | 1459 | (current-indentation))) |
| 1460 | (body-indentation | 1460 | (body-indentation |
| 1461 | (and (> arg 0) | 1461 | (and (> arg 0) |
| 1462 | (or (and (python-info-looking-at-beginning-of-defun) | 1462 | (or (and (python-info-looking-at-beginning-of-defun nil t) |
| 1463 | (+ (current-indentation) python-indent-offset)) | 1463 | (+ (save-excursion |
| 1464 | (python-nav-beginning-of-statement) | ||
| 1465 | (current-indentation)) | ||
| 1466 | python-indent-offset)) | ||
| 1464 | (save-excursion | 1467 | (save-excursion |
| 1465 | (while | 1468 | (while |
| 1466 | (and | 1469 | (and |