diff --git a/application.py b/application.py index 419b9fe..df065e3 100755 --- a/application.py +++ b/application.py @@ -93,38 +93,39 @@ class Application(object): self.mode_extensions = {} self.mode_detection = {} - mode2.Fundamental.install(self) - mode.blame.Blame.install(self) - mode.c.C.install(self) - mode.console.Console.install(self) - mode.consolemini.ConsoleMini.install(self) - mode.css.CSS.install(self) - mode.diff.Diff.install(self) - mode.dir.Dir.install(self) - mode.elisp.ELisp.install(self) - mode.hex.Hex.install(self) - mode.html.HTML.install(self) - mode.java.Java.install(self) - mode.javascript.Javascript.install(self) - mode.lisp.Lisp.install(self) - mode.make.Make.install(self) - mode.mini.Mini.install(self) - mode.mutt.Mutt.install(self) - mode.nasm.Nasm.install(self) - mode.ocaml.Ocaml.install(self) - mode.perl.Perl.install(self) - mode.python.Python.install(self) - mode.replace.Replace.install(self) - mode.rst.RST.install(self) - mode.scheme.Scheme.install(self) - mode.search.Search.install(self) - mode.sh.Sh.install(self) - mode.sql.Sql.install(self) - mode.tt.Template.install(self) - mode.text.Text.install(self) + #mode2.Fundamental.install(self) + mode2.install(self) + mode.blame.install(self) + mode.c.install(self) + mode.console.install(self) + mode.consolemini.install(self) + mode.css.install(self) + mode.diff.install(self) + mode.dir.install(self) + mode.elisp.install(self) + mode.hex.install(self) + mode.html.install(self) + mode.java.install(self) + mode.javascript.install(self) + mode.lisp.install(self) + mode.make.install(self) + mode.mini.install(self) + mode.mutt.install(self) + mode.nasm.install(self) + mode.ocaml.install(self) + mode.perl.install(self) + mode.python.install(self) + mode.replace.install(self) + mode.rst.install(self) + mode.scheme.install(self) + mode.search.install(self) + mode.sh.install(self) + mode.sql.install(self) + mode.tt.install(self) + mode.text.install(self) mode.text2.Text2.install(self) - mode.which.Which.install(self) - mode.xml.XML.install(self) + mode.which.install(self) + mode.xml.install(self) # initialize our methods self.methods = {} diff --git a/mode/bds.py b/mode/bds.py index 99e6abb..47f500a 100644 --- a/mode/bds.py +++ b/mode/bds.py @@ -82,3 +82,5 @@ class BDSCompileResources(Method): class BDSRestart(Method): def _execute(self, w, **vargs): pass + +install = BDS.install diff --git a/mode/blame.py b/mode/blame.py index e57b7ff..bdf9062 100644 --- a/mode/blame.py +++ b/mode/blame.py @@ -22,3 +22,5 @@ class Blame(mode2.Fundamental): 'metadata.username': ('cyan', 'default', 'bold'), 'metadata.end': ('green', 'default', 'bold'), } + +install = Blame.install diff --git a/mode/c.py b/mode/c.py index 63e5e87..8c61a33 100644 --- a/mode/c.py +++ b/mode/c.py @@ -272,3 +272,5 @@ class CMake(method.Method): w.application.data_buffer("*CMake*", output, switch_to=err) w.set_error(errmsg) + +install = C.install diff --git a/mode/console.py b/mode/console.py index d77fe8c..830cdc3 100644 --- a/mode/console.py +++ b/mode/console.py @@ -27,3 +27,5 @@ class Console(mode2.Fundamental): 'string.null': ('green', 'default'), 'string.end': ('green', 'default'), } + +install = Console.install diff --git a/mode/consolemini.py b/mode/consolemini.py index 22dc529..72b324c 100644 --- a/mode/consolemini.py +++ b/mode/consolemini.py @@ -180,3 +180,4 @@ class ConsoleHistoryNext(method.Method): # a.add_buffer(buffer.ConsoleBuffer()) # b = a.bufferlist.get_buffer_by_name('*Console*') # b.insert_string(b.get_buffer_end(), repr(candidates) + '\n', force=True) +install = ConsoleMini.install diff --git a/mode/css.py b/mode/css.py index 9ba8b8a..a07a3b8 100644 --- a/mode/css.py +++ b/mode/css.py @@ -91,3 +91,5 @@ class CSS(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = CSS.install diff --git a/mode/diff.py b/mode/diff.py index dbe5234..fefe2ad 100644 --- a/mode/diff.py +++ b/mode/diff.py @@ -47,3 +47,5 @@ class DiffPreviousSection(method.Method): w.goto_line(i) return i -= 1 + +install = Diff.install diff --git a/mode/dir.py b/mode/dir.py index c8e34a1..694b7d5 100644 --- a/mode/dir.py +++ b/mode/dir.py @@ -198,3 +198,5 @@ class RemovePath(Method): w.application.methods['refresh-view'].execute(w, filename=path) except: w.set_error("failed to delete %r" % path) + +install = Dir.install diff --git a/mode/elisp.py b/mode/elisp.py index 8830654..4c26674 100644 --- a/mode/elisp.py +++ b/mode/elisp.py @@ -62,3 +62,5 @@ class ELisp(mode2.Fundamental): self.add_bindings('close-bracket', (']',)) ## add lisp-specific methods #self.add_action_and_bindings(LispCheckSyntax(), ('C-c s',)) + +install = ELisp.install diff --git a/mode/hex.py b/mode/hex.py index f397606..70e7b67 100644 --- a/mode/hex.py +++ b/mode/hex.py @@ -85,3 +85,5 @@ class FindStrings(Method): lastline += newline i = (i + 1) % 4 w.application.data_buffer("*Strings*", '\n'.join(newlines), switch_to=True) + +install = Hex.install diff --git a/mode/html.py b/mode/html.py index 9b1abbf..43f38f0 100644 --- a/mode/html.py +++ b/mode/html.py @@ -47,3 +47,5 @@ class HTML(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = HTML.install diff --git a/mode/java.py b/mode/java.py index 16a3419..3ad7237 100644 --- a/mode/java.py +++ b/mode/java.py @@ -192,3 +192,5 @@ class Java(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = Java.install diff --git a/mode/javascript.py b/mode/javascript.py index caf99c0..a0a187e 100644 --- a/mode/javascript.py +++ b/mode/javascript.py @@ -95,3 +95,5 @@ class Javascript(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = Javascript.install diff --git a/mode/lisp.py b/mode/lisp.py index 7f4eccc..db932a2 100644 --- a/mode/lisp.py +++ b/mode/lisp.py @@ -52,3 +52,5 @@ class Lisp(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = Lisp.install diff --git a/mode/make.py b/mode/make.py index e1703e2..94902fa 100644 --- a/mode/make.py +++ b/mode/make.py @@ -50,3 +50,5 @@ class Make(mode2.Fundamental): 'string.end': ('green', 'default'), } colors.update(Sh.colors) + +install = Make.install diff --git a/mode/mini.py b/mode/mini.py index 9dda313..75493aa 100644 --- a/mode/mini.py +++ b/mode/mini.py @@ -35,3 +35,5 @@ class MiniTabComplete(method.Method): s1 = b.make_string() s2, exists, complete = b.tabber.tab_string(s1, window) b.set_data(s2) + +install = Mini.install diff --git a/mode/mutt.py b/mode/mutt.py index b180e31..c893402 100644 --- a/mode/mutt.py +++ b/mode/mutt.py @@ -50,3 +50,5 @@ class MuttWrapParagraph(method.WrapParagraph): class MuttInsertSpace(mode.text.TextInsertSpace): limit = 72 wrapper = MuttWrapParagraph + +install = Mutt.install diff --git a/mode/nasm.py b/mode/nasm.py index 59cd7ff..ab3d069 100644 --- a/mode/nasm.py +++ b/mode/nasm.py @@ -41,3 +41,5 @@ class Nasm(mode2.Fundamental): 'instructions': ('magenta', 'default'), 'label': ('blue', 'default'), } + +install = Nasm.install diff --git a/mode/ocaml.py b/mode/ocaml.py index 02e3fc5..68d640d 100644 --- a/mode/ocaml.py +++ b/mode/ocaml.py @@ -92,3 +92,5 @@ class Ocaml(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = Ocaml.install diff --git a/mode/perl.py b/mode/perl.py index 27665e3..ac36258 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -709,3 +709,5 @@ class PerlWrapParagraph(Method): WrapParagraph._execute(self, w, **vargs) else: w.set_error("did not detect comment or pod lines") + +install = Perl.install diff --git a/mode/python.py b/mode/python.py index 82ab78d..523b422 100644 --- a/mode/python.py +++ b/mode/python.py @@ -320,3 +320,5 @@ class PythonDictCleanup(method.Method): end_p = Point(len(w.buffer.lines[-1]), len(w.buffer.lines) - 1) w.kill(start_p, end_p) w.insert_string(start_p, data) + +install = Python.install diff --git a/mode/replace.py b/mode/replace.py index 02fa98d..c99a6ce 100644 --- a/mode/replace.py +++ b/mode/replace.py @@ -106,3 +106,5 @@ def _end(w): w.buffer.method.old_cursor = None w.buffer.method.old_window = None assert not w.application.mini_active + +install = Replace.install diff --git a/mode/rst.py b/mode/rst.py index feb566e..8e37050 100644 --- a/mode/rst.py +++ b/mode/rst.py @@ -75,3 +75,5 @@ class RST(mode2.Fundamental): 'bullet': ('magenta', 'default'), 'enumeration': ('magenta', 'default'), } + +install = RST.install diff --git a/mode/scheme.py b/mode/scheme.py index 2738006..4626ad1 100644 --- a/mode/scheme.py +++ b/mode/scheme.py @@ -55,3 +55,5 @@ class Scheme(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = Scheme.install diff --git a/mode/search.py b/mode/search.py index a72fb09..65a5a19 100644 --- a/mode/search.py +++ b/mode/search.py @@ -137,3 +137,5 @@ def _end(w): w.application.close_mini_buffer() w.application.clear_highlighted_ranges() w.application.last_search = w.buffer.make_string() + +install = Search.install diff --git a/mode/sh.py b/mode/sh.py index 8479c62..f264781 100644 --- a/mode/sh.py +++ b/mode/sh.py @@ -164,3 +164,5 @@ class ShCheckSyntax(Method): app.data_buffer("*Sh-Check-Syntax*", output, switch_to=False) else: app.data_buffer("*Sh-Check-Syntax*", output) + +install = Sh.install diff --git a/mode/sql.py b/mode/sql.py index 6e2a231..b853c68 100644 --- a/mode/sql.py +++ b/mode/sql.py @@ -133,3 +133,5 @@ class Sql(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = Sql.install diff --git a/mode/text.py b/mode/text.py index 0605ba0..29ed5ca 100644 --- a/mode/text.py +++ b/mode/text.py @@ -86,3 +86,5 @@ class LearnWord(method.Method): # cheap way to relex just this word; there should really be a function w.insert_string_at_cursor(' ') w.left_delete() + +install = Text.install diff --git a/mode/text2.py b/mode/text2.py index ccaef2f..ec9b073 100644 --- a/mode/text2.py +++ b/mode/text2.py @@ -26,3 +26,5 @@ class Text2(mode.text.Text): 'punct': ('default', 'default'), 'stuff': ('default', 'default'), } + +install = Text2.install diff --git a/mode/tt.py b/mode/tt.py index 6def87e..dc1d966 100644 --- a/mode/tt.py +++ b/mode/tt.py @@ -62,3 +62,5 @@ class Template(mode2.Fundamental): self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) + +install = Template.install diff --git a/mode/which.py b/mode/which.py index 9f45f93..29ca5f1 100644 --- a/mode/which.py +++ b/mode/which.py @@ -29,3 +29,5 @@ class Which(mode2.Fundamental): self.window.application.close_mini_buffer() self.window.buffer.method.old_cursor = None self.window.buffer.method.old_window = None + +install = Which.install diff --git a/mode/xml.py b/mode/xml.py index 40e91f0..10b50f5 100644 --- a/mode/xml.py +++ b/mode/xml.py @@ -34,3 +34,5 @@ class XML(mode2.Fundamental): 'tag.string.end': ('green', 'default'), 'tag.end': ('default', 'default'), } + +install = XML.install diff --git a/mode2.py b/mode2.py index 7a5b59b..0531232 100644 --- a/mode2.py +++ b/mode2.py @@ -277,3 +277,4 @@ class Fundamental(Handler): ghist.setdefault(name, {}) ghist[name][newp] = self.ghist[name][gp] self.ghist = ghist +install = Fundamental.install