pmacs3/mode/about.py

31 lines
1.1 KiB
Python

import mode
from lex import Grammar, PatternRule, RegionRule, PatternGroupRule
class AboutGrammar(Grammar):
rules = [
PatternRule(r'about_stars', r'\*+'),
PatternRule(r'about_equals', r'=+'),
PatternRule(r'about_pmacs', r'pmacs'),
PatternRule(r'about_author', r'Erik Osheim'),
PatternRule(r'about_copyright', r'\(c\) 2005-2007'),
PatternRule(r'about_license', r'GNU General Public License v2'),
PatternRule(r'about_binding', r'C-c M-h'),
PatternRule(r'about_command', r'\(show-bindings-buffer\)'),
]
class About(mode.Fundamental):
modename = 'About'
grammar = AboutGrammar()
colors = {
'about_stars': ('yellow', 'default'),
'about_equals': ('red', 'default'),
'about_pmacs': ('cyan', 'default'),
'about_author': ('cyan', 'default'),
'about_copyright': ('blue', 'default'),
'about_license': ('cyan', 'default'),
'about_binding': ('cyan', 'default'),
'about_command': ('blue', 'default'),
}
install = About.install