branch : pmacs2
This commit is contained in:
moculus 2007-06-23 19:07:44 +00:00
parent 76d7f942bf
commit b145f252c8
2 changed files with 9 additions and 10 deletions

View File

@ -112,9 +112,7 @@ class PerlTabber(tab2.StackTabber):
if not highlighter.tokens[y]:
return False
t = highlighter.tokens[y][0]
if t.name == 'keyword' and t.string == 'sub':
return True
return False
return t.name == 'keyword' and t.string == 'sub':
def _handle_open_token(self, currlvl, y, i):
currlvl = tab2.StackTabber._handle_open_token(self, currlvl, y, i)
return currlvl

View File

@ -121,13 +121,14 @@ class PythonGrammar(Grammar):
]
class PythonTabber(tab2.Tabber):
start_tags = {'(': ')',
'{': '}',
'[': ']'}
close_tags = {')': '(',
'}': '{',
']': '['}
def is_base(self, y):
if y == 0:
return True
highlighter = self.mode.window.buffer.highlights[self.mode.name()]
if not highlighter.tokens[y]:
return False
t = highlighter.tokens[y][0]
return t.name == 'keyword' and t.string == 'def':
def __init__(self, m):
tab2.Tabber.__init__(self, m)