From b0f40259d6045d51418013c09c0165ee07bafcdc Mon Sep 17 00:00:00 2001 From: moculus Date: Thu, 18 Oct 2007 16:05:21 +0000 Subject: [PATCH] help for conf --HG-- branch : pmacs2 --- application.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/application.py b/application.py index 4b766a7..e94a469 100755 --- a/application.py +++ b/application.py @@ -239,6 +239,17 @@ class Application(object): curses.noecho() curses.nonl() + def setmode(self, name, cls, paths=[], basenames=[], extensions=[], detection=[]): + self.modes[name] = cls + for p in paths: + self.mode_paths[p] = name + for b in basenames: + self.mode_basenames[b] = name + for e in extensions: + self.mode_extensions[e] = name + for d in detection: + self.mode_detection[d] = name + def globals(self): return globals() def locals(self):