parent
f9482725d7
commit
1ea5d18fa5
|
@ -156,14 +156,15 @@ class Application(object):
|
|||
'method.git',
|
||||
)
|
||||
for name in names:
|
||||
exec("import %s" % name)
|
||||
mod = eval(name)
|
||||
for mname in dir(mod):
|
||||
if mname.startswith('_'):
|
||||
continue
|
||||
cls = eval("%s.%s" % (name, mname))
|
||||
if hasattr(cls, '_is_method') and cls._is_method:
|
||||
self.methods[cls._name()] = cls()
|
||||
self.load_pmacs_methods(name)
|
||||
#exec("import %s" % name)
|
||||
#mod = eval(name)
|
||||
#for mname in dir(mod):
|
||||
# if mname.startswith('_'):
|
||||
# continue
|
||||
# cls = eval("%s.%s" % (name, mname))
|
||||
# if hasattr(cls, '_is_method') and cls._is_method:
|
||||
# self.methods[cls._name()] = cls()
|
||||
|
||||
# ok, now let's load all the "standard" modes
|
||||
mode.install(self)
|
||||
|
@ -262,6 +263,16 @@ class Application(object):
|
|||
curses.halfdelay(1)
|
||||
curses.def_prog_mode()
|
||||
|
||||
def load_pmacs_methods(self, name):
|
||||
exec("import %s" % name)
|
||||
mod = eval(name)
|
||||
for mname in dir(mod):
|
||||
if mname.startswith('_'):
|
||||
continue
|
||||
cls = eval("%s.%s" % (name, mname))
|
||||
if hasattr(cls, '_is_method') and cls._is_method:
|
||||
self.methods[cls._name()] = cls()
|
||||
|
||||
def _load_config_defaults(self):
|
||||
self.config['ignore_suffix'] = ['~', '-', 'CVS', '.svn', '.git', '.hg']
|
||||
self.config['error_timeout'] = -1
|
||||
|
|
Loading…
Reference in New Issue