summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-scite.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-10-19 01:20:13 +0300
committerMarius <mariausol@gmail.com>2012-10-19 01:20:13 +0300
commit69d2352af4b60929b37fc49f3bdb263977016244 (patch)
treedb5eb11398e345dfa23b4c4500fb93575d2afb7c /scripts/context/lua/mtx-scite.lua
parentc18f7cbe51449a611ea1819fedd9a4ff18529b7d (diff)
downloadcontext-69d2352af4b60929b37fc49f3bdb263977016244.tar.gz
stable 2012.05.30 11:26
Diffstat (limited to 'scripts/context/lua/mtx-scite.lua')
-rw-r--r--scripts/context/lua/mtx-scite.lua25
1 files changed, 4 insertions, 21 deletions
diff --git a/scripts/context/lua/mtx-scite.lua b/scripts/context/lua/mtx-scite.lua
index 3369c5f3b..116555e79 100644
--- a/scripts/context/lua/mtx-scite.lua
+++ b/scripts/context/lua/mtx-scite.lua
@@ -199,31 +199,14 @@ function scripts.scite.words()
if lfs.isfile(txtname) then
report("loading %s",txtname)
local olddata = io.loaddata(txtname) or ""
- local words = splitwords(olddata)
- local min, max, n = 100, 1, 0
- for k, v in next, words do
- local l = #k
- if l < min then
- min = l
- end
- if l > max then
- max = l
- end
- n = n + 1
- end
- if min > max then
- min = max
- end
local newdata = {
- words = words,
+ words = splitwords(olddata),
+ -- words = olddata,
source = oldname,
- min = min,
- max = max,
- n = n,
}
- report("saving %q, %s words, %s shortest, %s longest",luaname,n,min,max)
+ report("saving %s",luaname)
io.savedata(luaname,table.serialize(newdata,true))
- report("compiling %q",lucname)
+ report("compiling %s",lucname)
os.execute(format("luac -s -o %s %s",lucname,luaname))
else
report("no data file %s",txtname)