import commands, os.path, sets, string, sys, traceback import color, completer, default, mode, method, regex, tab from point import Point from lex import Grammar, PatternRule, RegionRule, OverridePatternRule from mode.lisp import LispTabber, LispCommentRegion, LispUncommentRegion class StringGrammar(Grammar): rules = [ PatternRule(r'octal', r'\\[0-7]{3}'), PatternRule(r'escaped', r'\\.'), PatternRule(r'data', r'[^\\"]+'), ] class ELispGrammar(Grammar): rules = [ PatternRule(r'comment', r';.*$'), PatternRule(r'delimiter', r'[()]'), PatternRule(r'elisp_reserved', r'(?:nil)(?![a-zA-Z0-9_])'), PatternRule(r'elisp_keyword', r'(?:while|when|unless|setq|require|or|not|mapcar|list|let|lambda|if|exists|equal|defvar|defun|defalias|count|cons|cdr|car|apply|and)(?![a-zA-Z0-9_])'), PatternRule(r'elisp_symbol', r"'[a-zA-Z_][a-zA-Z0-9-_]*"), PatternRule(r'elisp_type', r":[a-zA-Z_][a-zA-Z0-9-_]*"), PatternRule(r'attribute', r"&[a-zA-Z_][a-zA-Z0-9-_]*"), PatternRule(r'bareword', r"[a-zA-Z_][a-zA-Z0-9-_]*"), PatternRule(r"integer", r"(?