pmacs3/mode/about.py

31 lines
1.1 KiB
Python
Raw Normal View History

import mode
from lex import Grammar, PatternRule, RegionRule, PatternGroupRule
class AboutGrammar(Grammar):
rules = [
2008-03-16 11:39:17 -04:00
PatternRule(r'about_stars', r'\*+'),
PatternRule(r'about_equals', r'=+'),
PatternRule(r'about_pmacs', r'pmacs'),
PatternRule(r'about_author', r'Erik Osheim'),
2008-03-16 16:26:32 -04:00
PatternRule(r'about_copyright', r'\(c\) 2005-2008'),
2008-03-16 11:39:17 -04:00
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', 'bold'),
'about_equals': ('red', 'default', 'bold'),
'about_pmacs': ('cyan', 'default', 'bold'),
'about_author': ('cyan', 'default', 'bold'),
'about_copyright': ('blue', 'default', 'bold'),
'about_license': ('cyan', 'default', 'bold'),
'about_binding': ('cyan', 'default', 'bold'),
'about_command': ('blue', 'default', 'bold'),
}
install = About.install