diff --git a/mode/perl.py b/mode/perl.py index 57d5597..772a7f3 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -309,6 +309,7 @@ class Perl(mode.Fundamental): self.add_action_and_bindings(PerlViewModulePerldoc(), ('C-c v',)) self.add_action_and_bindings(PerlViewWordPerldoc(), ('C-c p',)) self.add_action_and_bindings(PerlWrapParagraph(), ('M-q',)) + self.add_action_and_bindings(PerlInitFunctions(), ('C-c M-g',)) self.add_action_and_bindings(PerlGotoFunction(), ('C-c M-g',)) self.add_action_and_bindings(PerlWhichFunction(), ('C-c w',)) self.add_action_and_bindings(PerlListFunctions(), ('C-c W',)) @@ -411,6 +412,12 @@ class PerlViewWordPerldoc(Method): else: w.application.set_error('nothing found for %r' % word) +class PerlInitFunctions(Method): + '''Jump to a function defined in this module''' + def _execute(self, w, **vargs): + w.mode.build_function_map() + w.application.set_error("Initialized function map") + class PerlGotoFunction(Method): '''Jump to a function defined in this module''' args = [Argument("name", type(""), "perlfunction", "Goto Function: ")]