[Python-mode] [ python-mode-Patches-828393 ] Improved
py-current-defun (handles nesting)
SourceForge.net
noreply at sourceforge.net
Fri Dec 19 09:55:54 EST 2003
Patches item #828393, was opened at 2003-10-22 13:11
Message generated for change (Comment added) made by montanaro
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=828393&group_id=86916
Category: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Per Cederqvist (ceder)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improved py-current-defun (handles nesting)
Initial Comment:
The py-current-defun I wrote back in 1996 only works
well if
you have classes and functions at top level, and one
level of
methods in the classes. If you nest a class statement
inside
a function, or if you have a function nested inside a
function,
it will not provide a good name.
The attached patch is a rewrite of the py-current-defun
that
handles any level of nesting. If you have "class
Outer", which
contains "def method", which contains "class Inner", it
will
construct the name "Outer.method.Inner" for the inner
class.
----------------------------------------------------------------------
>Comment By: Skip Montanaro (montanaro)
Date: 2003-12-19 08:55
Message:
Logged In: YES
user_id=44345
Applied as python-mode.el 4.46. Sorry for the delay.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=828393&group_id=86916
More information about the Python-mode
mailing list