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.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):
|
||||
'''View documentation about a package or function using perldoc'''
|
||||
args = []
|
||||
|
@ -728,7 +742,7 @@ class Perl(mode.Fundamental):
|
|||
config = {}
|
||||
lconfig = {'perl.libs': []}
|
||||
actions = [PerlSetLib, PerlCheckSyntax, PerlHashCleanup,
|
||||
PerldocModule, PerldocWord, Perldoc, PerlWrapParagraph,
|
||||
PerldocModule, PerldocWord, Perldoc, PerldocF, PerlWrapParagraph,
|
||||
PerlInitFunctions, PerlGotoFunction, PerlWhichFunction,
|
||||
PerlListFunctions, PerlOpenModule, PerlOpenModuleWord,
|
||||
PerlSemanticComplete]
|
||||
|
|
Loading…
Reference in New Issue