parent
a767ede0c5
commit
d6d80218ef
16
mode/perl.py
16
mode/perl.py
|
@ -282,6 +282,20 @@ class Perldoc(Method):
|
||||||
w.application.color_data_buffer("*Perldoc*", data, switch_to=True)
|
w.application.color_data_buffer("*Perldoc*", data, switch_to=True)
|
||||||
w.set_error('displaying perldoc for %r' % name)
|
w.set_error('displaying perldoc for %r' % name)
|
||||||
|
|
||||||
|
class PerldocF(Perldoc):
|
||||||
|
def _execute(self, w, **vargs):
|
||||||
|
name = vargs['name']
|
||||||
|
if not self.name_re.match(name):
|
||||||
|
w.set_error("name %r is invalid" % name)
|
||||||
|
return
|
||||||
|
|
||||||
|
# then try it as a function
|
||||||
|
data = self._try(w, name, asfunc=True)
|
||||||
|
if data:
|
||||||
|
self._show(w, data, name)
|
||||||
|
else:
|
||||||
|
w.set_error('nothing found for %r' % name)
|
||||||
|
|
||||||
class PerldocWord(Perldoc):
|
class PerldocWord(Perldoc):
|
||||||
'''View documentation about a package or function using perldoc'''
|
'''View documentation about a package or function using perldoc'''
|
||||||
args = []
|
args = []
|
||||||
|
@ -728,7 +742,7 @@ class Perl(mode.Fundamental):
|
||||||
config = {}
|
config = {}
|
||||||
lconfig = {'perl.libs': []}
|
lconfig = {'perl.libs': []}
|
||||||
actions = [PerlSetLib, PerlCheckSyntax, PerlHashCleanup,
|
actions = [PerlSetLib, PerlCheckSyntax, PerlHashCleanup,
|
||||||
PerldocModule, PerldocWord, Perldoc, PerlWrapParagraph,
|
PerldocModule, PerldocWord, Perldoc, PerldocF, PerlWrapParagraph,
|
||||||
PerlInitFunctions, PerlGotoFunction, PerlWhichFunction,
|
PerlInitFunctions, PerlGotoFunction, PerlWhichFunction,
|
||||||
PerlListFunctions, PerlOpenModule, PerlOpenModuleWord,
|
PerlListFunctions, PerlOpenModule, PerlOpenModuleWord,
|
||||||
PerlSemanticComplete]
|
PerlSemanticComplete]
|
||||||
|
|
Loading…
Reference in New Issue