From 155285bee6b8655c417045c6f008ff7832de7215 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Fri, 24 Jul 2009 00:15:36 -0400 Subject: [PATCH] restored --HG-- branch : pmacs2 --- application.py | 18 +++++++++--------- buffer/colors.py | 1 - method/__init__.py | 5 +++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/application.py b/application.py index 0b62d6c..790c2e3 100755 --- a/application.py +++ b/application.py @@ -128,15 +128,15 @@ class Application(object): # ok, now let's load all the "standard" modes mode.install(self) - names = ('blame', 'c', 'console', 'consolemini', 'css', - 'diff', 'dir', 'elisp', 'hex', 'html', 'java', 'javascript', - 'lisp', 'make', 'mini', 'mutt', 'nasm', 'ocaml', 'perl', - 'python', 'replace', 'rst', 'scheme', 'search', 'sh', 'sql', - 'tt', 'text', 'text2', 'which', 'xml', 'cheetah', 'colortext', - 'latex', 'insertmini', 'conf', 'haskell', 'erlang', - 'iperl', 'iperlmini', 'ipython', 'ipythonmini', 'awk', - 'shell', 'shellmini', 'fstab', 'yacc', 'pipe', - 'mbox', 'error', 'lua', 'lily', 'forth', 'ebnf', + names = ( + 'blame', 'c', 'console', 'consolemini', 'css', 'diff', 'dir', + 'elisp', 'hex', 'html', 'java', 'javascript', 'lisp', 'make', + 'mini', 'mutt', 'nasm', 'ocaml', 'perl', 'python', 'replace', 'rst', + 'scheme', 'search', 'sh', 'sql', 'tt', 'text', 'text2', 'which', + 'xml', 'cheetah', 'colortext', 'latex', 'insertmini', 'conf', + 'haskell', 'erlang', 'iperl', 'iperlmini', 'ipython', 'ipythonmini', + 'awk', 'shell', 'shellmini', 'fstab', 'yacc', 'pipe', 'mbox', + 'error', 'lua', 'lily', 'forth', 'ebnf', ) for name in names: exec("import mode.%s; mode.%s.install(self)" % (name, name)) diff --git a/buffer/colors.py b/buffer/colors.py index 4ef9717..85761eb 100644 --- a/buffer/colors.py +++ b/buffer/colors.py @@ -7,7 +7,6 @@ import color from highlight import Highlighter def get_cbuf_code(*args): - #return '[' + ':'.join([reverse_map.get(x, 'd') for x in args]) + ']' return '[' + ':'.join([color.rev_ascii_map[x] for x in args]) + ']' # NOTE: this highlighter will not reprocess the data given. it is intended to diff --git a/method/__init__.py b/method/__init__.py index bc4587a..e30cd01 100644 --- a/method/__init__.py +++ b/method/__init__.py @@ -1103,6 +1103,11 @@ class SetModeTabWidth(Method): app.modes[mode].tabwidth = vargs['width'] w.set_error('Default tab width set to %d' % app.modes[mode].tabwidth) +class RenderColorData(Method): + def _execute(self, w, **vargs): + data = w.buffer.make_string() + w.application.color_data_buffer('*Rendered-Colortext*', data) + class ViewTokenColors(Method): args = [] def _execute(self, w, **vargs):