diff --git a/mode/c.py b/mode/c.py index a286262..2ec3f00 100644 --- a/mode/c.py +++ b/mode/c.py @@ -241,8 +241,8 @@ class CContext(context.Context): elif t.name == 'delimiter' and t.string == '}': if not stack: # we are totally hosed. start over. ugh. - #self.build_name_map() - raise Exception, "we're totally hosed" + #raise Exception, "we're totally hosed" + self.build_name_map() return stack.pop(-1) if curr: @@ -306,15 +306,18 @@ class C(mode.Fundamental): self.add_bindings('close-bracket', (']',)) self.add_bindings('c-check-syntax', ('C-c s',)) self.add_bindings('c-make', ('C-c C-c',)) - self.context = CContext(self) - self.functions = None - self.funclines = None + #self.context = CContext(self) + #self.functions = None + #self.funclines = None def get_functions(self): - return self.context.get_names() + #return self.context.get_names() + return {} def get_function_names(self): - return self.context.get_name_list() + #return self.context.get_name_list() + return [] def get_line_function(self, y): - return self.context.get_line_name(y) + #return self.context.get_line_name(y) + return None install = C.install