diff --git a/mode/perl.py b/mode/perl.py index 5ecab0a..cbc023f 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -221,7 +221,8 @@ class PerlCheckSyntax(Method): b.orig_path = w.buffer.path if retval == 0: a.set_error("Syntax OK") -class PerlViewModulePerldoc(Method): + +class PerldocModule(Method): '''View documentation about this buffer using perldoc''' prog = 'use Pod::Text;' \ 'Pod::Text->new(sentence=>0, width=>78)->parse_from_filehandle();' @@ -230,7 +231,7 @@ class PerlViewModulePerldoc(Method): args = ('perl', '-e', self.prog) app.run_pipe(args, w.buffer, '*Perldoc*', True) -class PerlViewPerldoc(Method): +class Perldoc(Method): name_re = re.compile('(?:[a-zA-Z_][a-zA-Z0-9_]*::)*[a-zA-Z_][a-zA-Z0-9_]*') args = [Argument("name", type(""), "", "Perldoc: ")] def _execute(self, w, **vargs): @@ -277,7 +278,7 @@ class PerlViewPerldoc(Method): w.application.data_buffer("*Perldoc*", data, switch_to=True) w.application.set_error('displaying documentation for %r' % name) -class PerlViewWordPerldoc(PerlViewPerldoc): +class PerldocWord(Perldoc): '''View documentation about a package or function using perldoc''' args = [] def _execute(self, w, **vargs): @@ -733,8 +734,7 @@ class Perl(mode.Fundamental): 'perl.libs': ['lib'], } actions = [PerlSetLib, PerlCheckSyntax, PerlHashCleanup, - PerlViewModulePerldoc, PerlViewWordPerldoc, PerlViewPerldoc, - PerlWrapParagraph, + PerldocModule, PerldocWord, Perldoc, PerlWrapParagraph, PerlInitFunctions, PerlGotoFunction, PerlWhichFunction, PerlListFunctions, PerlOpenModule, PerlOpenModuleWord, PerlSemanticComplete] @@ -752,8 +752,10 @@ class Perl(mode.Fundamental): self.add_bindings('perl-set-lib', ('C-c l',)) self.add_bindings('perl-check-syntax', ('C-c s',)) self.add_bindings('perl-hash-cleanup', ('C-c h',)) - self.add_bindings('perl-view-module-perldoc', ('C-c v',)) - self.add_bindings('perl-view-word-perldoc', ('C-c p',)) + #self.add_bindings('perl-view-module-perldoc', ('C-c v',)) + #self.add_bindings('perl-view-word-perldoc', ('C-c p',)) + self.add_bindings('perldoc-module', ('C-c v',)) + self.add_bindings('perldoc-word', ('C-c p',)) self.add_bindings('perl-wrap-paragraph', ('M-q',)) self.add_bindings('perl-goto-function', ('C-c M-g',)) self.add_bindings('perl-open-module', ('C-c C-f',)) diff --git a/mode/rst.py b/mode/rst.py index 8871ebe..61a9567 100644 --- a/mode/rst.py +++ b/mode/rst.py @@ -1,5 +1,6 @@ import color, method, mode from lex import Grammar, PatternRule, RegionRule, PatternGroupRule, OverrideRegionRule +from method import Method from mode.text import TextInsertSpace from mode.python import PythonGrammar @@ -49,6 +50,9 @@ class RstInsertSpace(TextInsertSpace): limit = 75 wrapper = RstWrapParagraph +class RstBuild(Method): + pass + class RST(mode.Fundamental): modename = 'RST' extensions = ['.rst']