summaryrefslogtreecommitdiff
path: root/scripts/context/lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2010-11-01 22:40:12 +0200
committerMarius <mariausol@gmail.com>2010-11-01 22:40:12 +0200
commitc0db05b960fecca63f1ead6204351137260d7c5f (patch)
treec3c82886dd8b4e25769f508572767702ea38accf /scripts/context/lua
parente19e21294c4450e292a48ee5a3cec8a90daf91ed (diff)
downloadcontext-c0db05b960fecca63f1ead6204351137260d7c5f.tar.gz
beta 2010.11.01 21:16
Diffstat (limited to 'scripts/context/lua')
-rw-r--r--scripts/context/lua/mtxrun.lua16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 2c50f7eee..6e0c2b74c 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -207,8 +207,8 @@ local lpeg = require("lpeg")
lpeg.patterns = lpeg.patterns or { } -- so that we can share
local patterns = lpeg.patterns
-local P, R, S, Ct, C, Cs, Cc, V = lpeg.P, lpeg.R, lpeg.S, lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.V
-local match = lpeg.match
+local P, R, S, V, match = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.match
+local Ct, C, Cs, Cc, Cf, Cg = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Cf, lpeg.Cg
local utfcharacters = string.utfcharacters
local utfgmatch = unicode and unicode.utf8.gmatch
@@ -3866,6 +3866,8 @@ utilities.parsers = utilities.parsers or { }
local parsers = utilities.parsers
parsers.patterns = parsers.patterns or { }
+-- we could use a Cf Cg construct
+
local P, R, V, C, Ct, Carg = lpeg.P, lpeg.R, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Carg
local lpegmatch = lpeg.match
local concat, format, gmatch = table.concat, string.format, string.gmatch
@@ -5151,8 +5153,14 @@ function logs.obsolete(old,new)
end
end
-function logs.texerrormessage(...) -- for the moment we put this function here
- tex.error(format(...), { })
+if tex and tex.error then
+ function logs.texerrormessage(...) -- for the moment we put this function here
+ tex.error(format(...), { })
+ end
+else
+ function logs.texerrormessage(...)
+ print(format(...))
+ end
end