Hi, The function `beginning-of-defun` seems to be be broken if there is a nested class definition in the function. I think this also means that `(thing-at-point 'defun)` isn't working as expected. Behaviour: 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 Yilin