mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-21 05:21:37 -07:00
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).
This commit is contained in:
parent
df667e9f17
commit
09e433ec7f
2 changed files with 31 additions and 2 deletions
|
|
@ -1995,6 +1995,32 @@ def c():
|
|||
(beginning-of-line)
|
||||
(point))))))
|
||||
|
||||
(ert-deftest python-nav-beginning-of-defun-5 ()
|
||||
(python-tests-with-temp-buffer
|
||||
"
|
||||
class C:
|
||||
|
||||
def \\
|
||||
m(self):
|
||||
pass
|
||||
"
|
||||
(python-tests-look-at "m(self):")
|
||||
(should (= (save-excursion
|
||||
(python-nav-beginning-of-defun)
|
||||
(point))
|
||||
(save-excursion
|
||||
(python-tests-look-at "def \\" -1)
|
||||
(beginning-of-line)
|
||||
(point))))
|
||||
(python-tests-look-at "class C:" -1)
|
||||
(should (= (save-excursion
|
||||
(python-nav-beginning-of-defun -1)
|
||||
(point))
|
||||
(save-excursion
|
||||
(python-tests-look-at "def \\")
|
||||
(beginning-of-line)
|
||||
(point))))))
|
||||
|
||||
(ert-deftest python-nav-end-of-defun-1 ()
|
||||
(python-tests-with-temp-buffer
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue