diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-01-17 23:50:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-01-17 23:50:00 +0100 |
commit | 4e362156550b2624811c01de388d3d695f444d77 (patch) | |
tree | f3d343ab5c0d57634aa8f2411013dd4dc49aebee /scripts | |
parent | c3fb9b7d537059ec737147e65049e54585a9f777 (diff) | |
download | context-4e362156550b2624811c01de388d3d695f444d77.tar.gz |
beta 2010.01.17 23:50
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-scite.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/context/lua/mtx-scite.lua b/scripts/context/lua/mtx-scite.lua index 7caedea29..6071bed3a 100644 --- a/scripts/context/lua/mtx-scite.lua +++ b/scripts/context/lua/mtx-scite.lua @@ -6,6 +6,9 @@ if not modules then modules = { } end modules ['mtx-scite'] = { license = "see context related readme files" } +-- todo: append to global properties else order of loading problem +-- linux problem ... files are under root protection so we need --install + scripts = scripts or { } scripts.scite = scripts.scite or { } @@ -89,12 +92,17 @@ function scripts.scite.start(indeed) if fontpath ~= "" then check_state(extrafont,fontpath) end - local userpropfile = "sciteuser.properties" + local userpropfile = "SciTEUser.properties" + if os.name ~= "windows" then + userpropfile = "." .. userpropfile + end local fullpropfile = file.join(userpath,userpropfile) - local userpropdata = io.loaddata(fullpropfile) + local userpropdata = io.loaddata(fullpropfile) or "" local propfiledone = false if pragmafound then - if string.find(userpropdata,"import *pragma") then + if userpropdata == "" then + logdata[#logdata+1] = { "error : no user properties found on '%s'", fullpropfile } + elseif string.find(userpropdata,"import *pragma") then logdata[#logdata+1] = { "up to date : 'import pragma' in '%s'", userpropfile } else logdata[#logdata+1] = { "yet unset : 'import pragma' in '%s'", userpropfile } |