--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 # ok, now let's load all the "standard" modes
mode.install(self) mode.install(self)
names = ('blame', 'c', 'console', 'consolemini', 'css', names = (
'diff', 'dir', 'elisp', 'hex', 'html', 'java', 'javascript', 'blame', 'c', 'console', 'consolemini', 'css', 'diff', 'dir',
'lisp', 'make', 'mini', 'mutt', 'nasm', 'ocaml', 'perl', 'elisp', 'hex', 'html', 'java', 'javascript', 'lisp', 'make',
'python', 'replace', 'rst', 'scheme', 'search', 'sh', 'sql', 'mini', 'mutt', 'nasm', 'ocaml', 'perl', 'python', 'replace', 'rst',
'tt', 'text', 'text2', 'which', 'xml', 'cheetah', 'colortext', 'scheme', 'search', 'sh', 'sql', 'tt', 'text', 'text2', 'which',
'latex', 'insertmini', 'conf', 'haskell', 'erlang', 'xml', 'cheetah', 'colortext', 'latex', 'insertmini', 'conf',
'iperl', 'iperlmini', 'ipython', 'ipythonmini', 'awk', 'haskell', 'erlang', 'iperl', 'iperlmini', 'ipython', 'ipythonmini',
'shell', 'shellmini', 'fstab', 'yacc', 'pipe', 'awk', 'shell', 'shellmini', 'fstab', 'yacc', 'pipe', 'mbox',
'mbox', 'error', 'lua', 'lily', 'forth', 'ebnf', 'error', 'lua', 'lily', 'forth', 'ebnf',
) )
for name in names: for name in names:
exec("import mode.%s; mode.%s.install(self)" % (name, name)) exec("import mode.%s; mode.%s.install(self)" % (name, name))

View File

@ -7,7 +7,6 @@ import color
from highlight import Highlighter from highlight import Highlighter
def get_cbuf_code(*args): 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]) + ']' return '[' + ':'.join([color.rev_ascii_map[x] for x in args]) + ']'
# NOTE: this highlighter will not reprocess the data given. it is intended to # 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'] app.modes[mode].tabwidth = vargs['width']
w.set_error('Default tab width set to %d' % app.modes[mode].tabwidth) 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): class ViewTokenColors(Method):
args = [] args = []
def _execute(self, w, **vargs): def _execute(self, w, **vargs):