From 596ca723246638f923fa06974a6b96a2b1444cce Mon Sep 17 00:00:00 2001 From: moculus Date: Thu, 20 Mar 2008 19:37:55 +0000 Subject: [PATCH] perl-init-functions --HG-- branch : pmacs2 --- mode/perl.py | 7 +++++++ 1 file changed, 7 insertions(+) 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: ")]