parent
52b2c9d10d
commit
d9d025f2d0
|
@ -16,7 +16,7 @@ import mode.lisp, mode.elisp, mode.scheme, mode.ocaml
|
||||||
import mode.blame, mode.diff, mode.dir
|
import mode.blame, mode.diff, mode.dir
|
||||||
import mode.xml, mode.tt, mode.css, mode.javascript, mode.html, mode.hex
|
import mode.xml, mode.tt, mode.css, mode.javascript, mode.html, mode.hex
|
||||||
import mode.text, mode.text2, mode.mutt
|
import mode.text, mode.text2, mode.mutt
|
||||||
import mode.bds
|
#import mode.bds
|
||||||
import mode.rst
|
import mode.rst
|
||||||
|
|
||||||
def run(buffers, jump_to_line=None, init_mode=None):
|
def run(buffers, jump_to_line=None, init_mode=None):
|
||||||
|
@ -109,7 +109,7 @@ class Application(object):
|
||||||
'javascript': mode.javascript.Javascript,
|
'javascript': mode.javascript.Javascript,
|
||||||
'sql': mode.sql.Sql,
|
'sql': mode.sql.Sql,
|
||||||
'template': mode.tt.Template,
|
'template': mode.tt.Template,
|
||||||
'bds': mode.bds.BDS,
|
#'bds': mode.bds.BDS,
|
||||||
'rst': mode.rst.RST,
|
'rst': mode.rst.RST,
|
||||||
'java': mode.java.Java,
|
'java': mode.java.Java,
|
||||||
'hex': mode.hex.Hex,
|
'hex': mode.hex.Hex,
|
||||||
|
@ -132,7 +132,7 @@ class Application(object):
|
||||||
'.bashrc': 'sh',
|
'.bashrc': 'sh',
|
||||||
'.bash_profile': 'sh',
|
'.bash_profile': 'sh',
|
||||||
'.profile': 'sh',
|
'.profile': 'sh',
|
||||||
'components.xml': 'bds',
|
#'components.xml': 'bds',
|
||||||
'.emacs': 'elisp',
|
'.emacs': 'elisp',
|
||||||
'Makefile': 'make',
|
'Makefile': 'make',
|
||||||
}
|
}
|
||||||
|
@ -187,6 +187,9 @@ class Application(object):
|
||||||
height = self.y - 2
|
height = self.y - 2
|
||||||
width = self.x - 1
|
width = self.x - 1
|
||||||
|
|
||||||
|
# run user custom code here
|
||||||
|
self.loadrc()
|
||||||
|
|
||||||
# initialize our buffers
|
# initialize our buffers
|
||||||
# note that the first buffer in buffers will be initially visible
|
# note that the first buffer in buffers will be initially visible
|
||||||
buffers.append(buffer2.ScratchBuffer())
|
buffers.append(buffer2.ScratchBuffer())
|
||||||
|
@ -466,6 +469,16 @@ class Application(object):
|
||||||
def eval(self, s):
|
def eval(self, s):
|
||||||
return eval(s)
|
return eval(s)
|
||||||
|
|
||||||
|
#
|
||||||
|
def loadmode(self, name, path):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# load user configuration NOW
|
||||||
|
def loadrc(self):
|
||||||
|
path = os.path.join(os.getenv('HOME'), '.pmc', 'conf')
|
||||||
|
if os.path.exists(path):
|
||||||
|
execfile(path)
|
||||||
|
|
||||||
# the mighty run-loop!
|
# the mighty run-loop!
|
||||||
def run(self):
|
def run(self):
|
||||||
self.done = False
|
self.done = False
|
||||||
|
|
Loading…
Reference in New Issue