summaryrefslogtreecommitdiff
path: root/context/data/scite/scite-ctx.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-04-23 19:20:16 +0300
committerMarius <mariausol@gmail.com>2012-04-23 19:20:16 +0300
commit4a3d6c259183d2e619d39c4f273d7c5489356113 (patch)
tree563f7ba81d1d601d43062198b82049be63df9e0c /context/data/scite/scite-ctx.lua
parent959400a677b3eb6ff6513a750be6dde943e62c36 (diff)
downloadcontext-4a3d6c259183d2e619d39c4f273d7c5489356113.tar.gz
beta 2012.04.23 15:58
Diffstat (limited to 'context/data/scite/scite-ctx.lua')
-rw-r--r--context/data/scite/scite-ctx.lua16
1 files changed, 13 insertions, 3 deletions
diff --git a/context/data/scite/scite-ctx.lua b/context/data/scite/scite-ctx.lua
index 9f3526dc3..3557994f3 100644
--- a/context/data/scite/scite-ctx.lua
+++ b/context/data/scite/scite-ctx.lua
@@ -80,8 +80,6 @@ function traceln(str)
io.flush()
end
--- require "lpeg"
-
function string.grab(str,delimiter)
local list = { }
for snippet in gmatch(str,delimiter) do
@@ -518,7 +516,7 @@ local worddone = 0
-- end
-- end
-function check_text()
+function check_text() -- obsolete, replaced by lexer
local dlanguage = props["ctx.spellcheck.language"]
local dwordsize = props["ctx.spellcheck.wordsize"]
@@ -838,3 +836,15 @@ menufunctions[14] = process_template_two
function open_log()
scite.Open(props['FileName'] .. ".log")
end
+
+if not lpeg then
+
+ local okay, root = pcall(function() return require "lpeg" end)
+
+ if okay then
+ lpeg = root
+ else
+ trace("\nwarning: lpeg not loaded\n")
+ end
+
+end