Skip to content


Subversion checkout URL

You can clone with
Download ZIP


which-function-mode? pretty please? #9

chipdude opened this Issue · 4 comments

2 participants


No description provided.


Sure. Do you have any suggestions for an algorithm to use? It would be nice to detect package boundaries, not be fooled by code like sub foo { sub { ... } }, and optionally support other "sub defining keywords", like "method".

(Note that unlike most static analysis packages, we have to be able to get the right answer even when the code is sligthly malformed, like as it's being typed in.)

Anyway, I played with something similar to this in Pure Perl a while ago, see Your thoughts would be appreciated.


The idea is to help with gross navigation, so I personally would be content with support for

m{ ^ \s* package \s+ (\w[:\w]) }xm
m{ ^ \s
$sub_keyword \s+ (\w[:\w]*) }xm

where default $sub_keyword is 'sub', 'method', 'before', 'after', 'around', and now 'func' (see Method::Signatures::Simple)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.