diff --git a/mode/__init__.py b/mode/__init__.py index 957741a..947bedc 100644 --- a/mode/__init__.py +++ b/mode/__init__.py @@ -87,6 +87,7 @@ class Fundamental(Handler): tabber = None colors = {} config = {} + methods = [] # margin/line numbering show_line_numbers = False @@ -105,6 +106,12 @@ class Fundamental(Handler): app.token_colors[key] = val for (key, val) in cls.config.iteritems(): app.config[key] = val + for mcls in cls.methods: + m = mcls() + if m.name in app.methods: + return + else: + app.methods[m.name] = m install = classmethod(install) def __init__(self, w):