bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36700: 27.0.50; python-mode beginning-of-defun broken


From: Stefan Kangas
Subject: bug#36700: 27.0.50; python-mode beginning-of-defun broken
Date: Tue, 25 Aug 2020 17:26:00 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tags 36700 + notabug
close 36700
thanks

Noam Postavsky <npostavs@gmail.com> writes:

> Yilin Wei <yilin.wei10@gmail.com> writes:
>
>> def moo():
>>     class Test:
>>       pass
>>     <-
>>
>> When the cursor is at the location marked, running (beginning-of-defun)
>> makes the cursor go to the wrong location, shown below, instead of to
>> the beginning of the def.
>>
>> def moo():
>> <-   class Test:
>>        pass
>
> I don't think this is a bug, python.el just takes a more liberal
> interpretation of "defun" that includes class definitions.  See for
> example, python-nav-beginning-of-defun-regexp:
>
>     (defvar python-nav-beginning-of-defun-regexp
>                                     ^^^^^^^^^^^^
>       (python-rx line-start (* space) defun (+ space) (group symbol-name))
>       "Regexp matching class or function definition.
>                        ^^^^^^^^^^^^^^^^^

I agree with Noam here, and seeing as there has been no further replies
within 1 year, I'm therefore closing this bug report.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]