elisp fix and header bug

--HG--
branch : pmacs2
This commit is contained in:
moculus 2009-02-01 23:30:40 +00:00
parent 8a77dafb42
commit 87dce5ee27
2 changed files with 4 additions and 4 deletions

View File

@ -781,8 +781,8 @@ class Application(object):
# XYZ
rstrs = w.mode.get_header(w)
assert len(rstrs) >= w.mode.header
for i in range(0, w.mode.header):
rstrs[i].draw(self.win, slot.y_offset + i, slot.x_offset)
for j in range(0, w.mode.header):
rstrs[j].draw(self.win, slot.y_offset + j, slot.x_offset)
# XYZ
self._draw_slot(i)
@ -795,7 +795,7 @@ class Application(object):
count = w.mode.header #XYZ
x, y = w.first.xy()
px = p1.x
while count < slot.height:
while count < slot.heigh:
if p1.y == y and px >= x and px - x < slot.width:
if slot.width > p2.x - x:
self.highlight_chars(slot.y_offset + count, px-x + w.mode.lmargin, p2.x-x, fg, bg)

View File

@ -16,7 +16,7 @@ class ELispGrammar(Grammar):
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_keyword', r'(?:while|when|unless|setq-default|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-_]*"),