Show upper methods and classes

Bug #328834 reported by Guettli-users
2
Affects Status Importance Assigned to Milestone
python-mode.el
Invalid
Medium
Unassigned

Bug Description

Hi,

this patch shows the upper methods and classes and binds
this to C-c C-x

Example:
class Foo:
    def blu():
        def subblu():
            print "foo"
if you press C-c C-x in the last line you see
Foo/blu/subblu/

This is handy if you query-replace in a long method and
you want to be sure that you are still in this method
and not in the next

Tested with XEmacs 21.4 and Emacs 21.3.1

I tried to bind this into the mode-line, but failed.
This would
be better since you could see all the time in which methods
and classes the cursor is.

[http://sourceforge.net/tracker/index.php?func=detail&aid=1077902&group_id=86916&atid=581351]

Revision history for this message
Guettli-users (guettli-users) wrote :
Revision history for this message
Montanaro (montanaro) wrote :

I'm working on this. I noticed a number of changes of "iff"
to "if". Just
checking to make sure you're aware that in English "iff" is
a shorthand
for "if and only if". If you were just correcting spelling,
I'll reword those
comments to not rely on idiomatic English.

Revision history for this message
Theller-users (theller-users) wrote :

FYI: func-menu (included with XEmacs) does something
similar, and also works for other languages. It also
displays the function or class/method the cursor is in in
the mode-line.

Revision history for this message
Montanaro (montanaro) wrote :

I'm going to go with func-menu for now. Its nested function display
isn't perfect, but I suspect it can be fixed, and if so, would probably
help a broader community than just folks using Python.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.