Am 08.09.22 um 22:10 schrieb Fabrice Bauzac-Stehly: > Hello, > > In python-mode, with a class that has methods, if I do end-of-defun > then beginning-of-defun, I do not necessarily come back to the > original location. > > ================ > > Example: > > In a python-mode buffer, put: > ---- > def fun1(): > pass > > class MyClass: > def meth1(self): > pass > > def meth2(self): > pass > > def meth3(self): > pass > > def fun2(): > pass > > def fun3(): > pass > ---- May confirm the bug with GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-09-01 BTW if starting from an empty line just line below def meth3(self) and before "pass", it should reach "def meth3(self)", as it does. From empty line below "pass" however should reach beginning of class.