pmacs3/mode_xml.py

33 lines
1.1 KiB
Python
Raw Normal View History

2007-03-06 10:05:38 -05:00
import sets, sys
import color, commands, default, lex, lex_xml, method, mode, point, regex, tab_xml
class XML(mode.Fundamental):
def __init__(self, w):
mode.Fundamental.__init__(self, w)
self.grammar = lex_xml.XMLGrammar()
self.lexer = lex.Lexer(self.grammar)
self.add_bindings('close-paren', (')',))
self.add_bindings('close-brace', ('}',))
self.add_bindings('close-bracket', (']',))
self.default_color = color.build('default', 'default')
self.colors = {
'namespace': color.build('magenta', 'default'),
'opentag': color.build('blue', 'default'),
'nodevalue': color.build('default', 'default'),
'attrname': color.build('cyan', 'default'),
'attrvalue': color.build('green', 'default'),
'closetag': color.build('blue', 'default'),
'comment': color.build('red', 'default'),
'bizzaro': color.build('magenta', 'green'),
}
#self.highlighter.lex_buffer()
#self.get_regions()
self.tabber = tab_xml.XMLTabber(self)
def name(self):
return "XML"