--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-07-24 00:15:36 -04:00
parent 92a2ebfe84
commit 155285bee6
3 changed files with 14 additions and 10 deletions

View File

@ -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))

View File

@ -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

View File

@ -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):