parent
0ed283b5af
commit
33c5cc3cf5
|
@ -344,7 +344,8 @@ class UppercaseWord(Method):
|
||||||
|
|
||||||
class MetaX(Method):
|
class MetaX(Method):
|
||||||
'''Call pmacs functions by name (with or without arguments)'''
|
'''Call pmacs functions by name (with or without arguments)'''
|
||||||
args = [arg('method', dt="method", p="M-x ", h='Method to execute')]
|
args = [arg('method', dt="method", p="M-x ", h='Method to execute',
|
||||||
|
q='metax')]
|
||||||
name_re = re.compile(r'[a-z0-9_-]+')
|
name_re = re.compile(r'[a-z0-9_-]+')
|
||||||
|
|
||||||
py_empty_re = re.compile(r'^\( *\)$')
|
py_empty_re = re.compile(r'^\( *\)$')
|
||||||
|
|
|
@ -295,7 +295,7 @@ class PerldocModule(PerlBase):
|
||||||
|
|
||||||
class Perldoc(Method):
|
class Perldoc(Method):
|
||||||
name_re = re.compile('(?:[a-zA-Z_][a-zA-Z0-9_]*::)*[a-zA-Z_][a-zA-Z0-9_]*')
|
name_re = re.compile('(?:[a-zA-Z_][a-zA-Z0-9_]*::)*[a-zA-Z_][a-zA-Z0-9_]*')
|
||||||
args = [arg("name", p="Perldoc: ")]
|
args = [arg("name", p="Perldoc: ", q='perldoc')]
|
||||||
def _execute(self, w, **vargs):
|
def _execute(self, w, **vargs):
|
||||||
name = vargs['name']
|
name = vargs['name']
|
||||||
if not self.name_re.match(name):
|
if not self.name_re.match(name):
|
||||||
|
@ -634,6 +634,7 @@ class PerlOpenModule(Method):
|
||||||
w.application.methods['open-file'].execute(w, filename=path)
|
w.application.methods['open-file'].execute(w, filename=path)
|
||||||
else:
|
else:
|
||||||
w.set_error("Could not find module %r" % vargs['module'])
|
w.set_error("Could not find module %r" % vargs['module'])
|
||||||
|
|
||||||
class PerlOpenModuleWord(Method):
|
class PerlOpenModuleWord(Method):
|
||||||
namechars = string.ascii_letters + string.digits + '_'
|
namechars = string.ascii_letters + string.digits + '_'
|
||||||
def _execute(self, w, **vargs):
|
def _execute(self, w, **vargs):
|
||||||
|
|
Loading…
Reference in New Issue