branch : pmacs2
This commit is contained in:
moculus 2007-06-17 12:38:46 +00:00
parent b61d3d3eb9
commit 214ee106aa
3 changed files with 11 additions and 11 deletions

10
mode.py
View File

@ -140,15 +140,15 @@ class Fundamental(Handler):
self.add_bindings('cmd-help-buffer', ('M-h',))
self.add_bindings('set-mode', ('C-x m',))
self.add_bindings('cancel', ('C-]',))
#self.add_bindings('close-paren', (')',))
#self.add_bindings('close-brace', ('}',))
#self.add_bindings('close-bracket', (']',))
self.add_bindings('close-paren', (')',))
self.add_bindings('close-brace', ('}',))
self.add_bindings('close-bracket', (']',))
# create all the insert actions for the character ranges we like
for c in string.letters + string.digits + string.punctuation:
## closing tags are handled differently
#if c == ')' or c == ']' or c == '}':
# continue
if c == ')' or c == ']' or c == '}':
continue
self.add_binding('insert-string-%s' % c, c)
# initialize some stuff

View File

@ -9,8 +9,8 @@ class Python(mode2.Fundamental):
def __init__(self, w):
mode2.Fundamental.__init__(self, w)
#self.tag_matching = True
self.tag_matching = False
self.tag_matching = True
#self.tag_matching = False
self.grammar = lex2_python.PythonGrammar()
self.lexer = lex2.Lexer(self.name(), self.grammar)
@ -19,9 +19,9 @@ class Python(mode2.Fundamental):
self.add_action_and_bindings(PythonUpdateTags(), ('C-c t',))
self.add_action_and_bindings(PythonTagComplete(), ('C-c k',))
#self.add_bindings('close-paren', (')',))
#self.add_bindings('close-brace', ('}',))
#self.add_bindings('close-bracket', (']',))
self.add_bindings('close-paren', (')',))
self.add_bindings('close-brace', ('}',))
self.add_bindings('close-bracket', (']',))
self.default_color = color.build('default', 'default')

View File

@ -190,7 +190,7 @@ class Window(object):
(x, y) = (0, 0)
break
counter += 1
self.first = Point(0, y)
self.first = Point(x - (x % self.width), y)
self.redraw()
def assure_visible_cursor(self):
if not self.cursor_is_visible():