parent
3b9fb77cbf
commit
757926196b
|
@ -1,4 +1,4 @@
|
||||||
import popen2, re
|
import os, popen2, re
|
||||||
import color, default, method, mode2, tab2
|
import color, default, method, mode2, tab2
|
||||||
from lex3 import Grammar, PatternRule, RegionRule
|
from lex3 import Grammar, PatternRule, RegionRule
|
||||||
from mode.python import StringGrammar
|
from mode.python import StringGrammar
|
||||||
|
@ -238,7 +238,7 @@ class C(mode2.Fundamental):
|
||||||
self.add_bindings('close-brace', ('}',))
|
self.add_bindings('close-brace', ('}',))
|
||||||
self.add_bindings('close-bracket', (']',))
|
self.add_bindings('close-bracket', (']',))
|
||||||
self.add_action_and_bindings(CMake(), ('C-c C-c',))
|
self.add_action_and_bindings(CMake(), ('C-c C-c',))
|
||||||
self.add_action_and_bindings(CSetMake(), ('C-c C-m',))
|
self.add_action_and_bindings(CSetMake(), ('C-c M-m',))
|
||||||
self.makecmd = "make"
|
self.makecmd = "make"
|
||||||
def name(self):
|
def name(self):
|
||||||
return "C"
|
return "C"
|
||||||
|
@ -253,7 +253,7 @@ class CSetMake(method.Method):
|
||||||
class CMake(method.Method):
|
class CMake(method.Method):
|
||||||
'''Check the syntax of the current python file'''
|
'''Check the syntax of the current python file'''
|
||||||
def _execute(self, w, **vargs):
|
def _execute(self, w, **vargs):
|
||||||
p = popen2.Popen4(w.makecmd)
|
p = popen2.Popen4(w.mode.makecmd)
|
||||||
p.tochild.close()
|
p.tochild.close()
|
||||||
output = p.fromchild.read()
|
output = p.fromchild.read()
|
||||||
result = p.wait()
|
result = p.wait()
|
||||||
|
|
Loading…
Reference in New Issue