emacs-devel
[Top][All Lists]
Advanced

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

Re: Python interactive navigation around nested functions


From: Dima Kogan
Subject: Re: Python interactive navigation around nested functions
Date: Mon, 20 Jun 2016 22:45:00 -0700
User-agent: mu4e 0.9.17; emacs 25.0.94.1

Stefan Monnier <address@hidden> writes:

>>         def wwrap(f):
>>             print 'Inside wwrap()'
>>             def wrapped_f(*args):
>>                 print 'Inside wrapped_f()'
>>                 print 'Decorator arguments:', arg1, arg2, arg3
>>                 f(*args)
>>                 print 'After f(*args)'
>>             return wrapped_f
>>         return wwrap
>
>
> Traditionally (IMO), C-M-a goes to the nearest beginning of defun at the
> same AST level or higher.  So from "return wrapped_f", it seems reasonable
> to jump to "def wrapped_f(*args):".

Hmmm. That's not at all how I always thought this was supposed to work,
but I actually see this behavior in several modes across several
languages, so it looks like you're right. I don't really LIKE it,
though, so let me ponder.

Thanks for setting me straight



reply via email to

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