summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-08-04 00:42:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-08-04 00:42:00 +0200
commite7b67a4f409457e80dde3a5383071869ace85685 (patch)
tree2cfad2e52e8b747def3f83a7fb03805f10b21d78 /scripts
parent0f1a89986b4143f38db25f744028ceafb63b78ee (diff)
downloadcontext-e7b67a4f409457e80dde3a5383071869ace85685.tar.gz
beta 2011.08.04 00:42
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-context.lua5
-rw-r--r--scripts/context/lua/mtxrun.lua21
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua21
-rwxr-xr-xscripts/context/stubs/unix/mtxrun21
4 files changed, 7 insertions, 61 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 3376ad432..a5ccc8a9a 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -1391,6 +1391,9 @@ end
function scripts.context.extras(pattern)
-- only in base path, i.e. only official ones
+ if type(pattern) ~= "string" then
+ pattern = "*"
+ end
local found = resolvers.findfile("context.mkiv")
if found ~= "" then
pattern = file.join(dir.expandname(file.dirname(found)),format("mtx-context-%s.tex",pattern or "*"))
@@ -1646,7 +1649,7 @@ elseif environment.argument("expert") then
elseif environment.argument("modules") then
scripts.context.modules()
elseif environment.argument("extras") then
- scripts.context.extras()
+ scripts.context.extras(environment.files[1] or environment.argument("extras"))
elseif environment.argument("extra") then
scripts.context.extra()
elseif environment.argument("help") then
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 158d11ecd..fc4e81d1c 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -1229,25 +1229,6 @@ patterns.unspacer = ((patterns.spacer^1)/"")^0
patterns.somecontent = (anything - newline - space)^1 -- (utf8char - newline - space)^1
patterns.beginline = #(1-newline)
--- local unquoted = Cs(patterns.unquoted * endofstring) -- not C
---
--- function string.unquoted(str)
--- return match(unquoted,str) or str
--- end
---
--- more efficient on long strings:
-
-local unquoted = (
- squote * Cs((1 - P(-2))^0) * squote
- + dquote * Cs((1 - P(-2))^0) * dquote
-)
-
-function string.unquoted(str)
- return match(unquoted,str) or str
-end
-
-patterns.unquoted = unquoted
-
-- print(string.unquoted("test"))
-- print(string.unquoted([["t\"est"]]))
-- print(string.unquoted([["t\"est"x]]))
@@ -5534,7 +5515,7 @@ local report, subreport, status, settarget, setformats, settranslations
local direct, subdirect, writer, pushtarget, poptarget
-if tex and tex.jobname or tex.formatname then
+if tex and (tex.jobname or tex.formatname) then
local valueiskey = { __index = function(t,k) t[k] = k return k end } -- will be helper
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 158d11ecd..fc4e81d1c 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -1229,25 +1229,6 @@ patterns.unspacer = ((patterns.spacer^1)/"")^0
patterns.somecontent = (anything - newline - space)^1 -- (utf8char - newline - space)^1
patterns.beginline = #(1-newline)
--- local unquoted = Cs(patterns.unquoted * endofstring) -- not C
---
--- function string.unquoted(str)
--- return match(unquoted,str) or str
--- end
---
--- more efficient on long strings:
-
-local unquoted = (
- squote * Cs((1 - P(-2))^0) * squote
- + dquote * Cs((1 - P(-2))^0) * dquote
-)
-
-function string.unquoted(str)
- return match(unquoted,str) or str
-end
-
-patterns.unquoted = unquoted
-
-- print(string.unquoted("test"))
-- print(string.unquoted([["t\"est"]]))
-- print(string.unquoted([["t\"est"x]]))
@@ -5534,7 +5515,7 @@ local report, subreport, status, settarget, setformats, settranslations
local direct, subdirect, writer, pushtarget, poptarget
-if tex and tex.jobname or tex.formatname then
+if tex and (tex.jobname or tex.formatname) then
local valueiskey = { __index = function(t,k) t[k] = k return k end } -- will be helper
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 158d11ecd..fc4e81d1c 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -1229,25 +1229,6 @@ patterns.unspacer = ((patterns.spacer^1)/"")^0
patterns.somecontent = (anything - newline - space)^1 -- (utf8char - newline - space)^1
patterns.beginline = #(1-newline)
--- local unquoted = Cs(patterns.unquoted * endofstring) -- not C
---
--- function string.unquoted(str)
--- return match(unquoted,str) or str
--- end
---
--- more efficient on long strings:
-
-local unquoted = (
- squote * Cs((1 - P(-2))^0) * squote
- + dquote * Cs((1 - P(-2))^0) * dquote
-)
-
-function string.unquoted(str)
- return match(unquoted,str) or str
-end
-
-patterns.unquoted = unquoted
-
-- print(string.unquoted("test"))
-- print(string.unquoted([["t\"est"]]))
-- print(string.unquoted([["t\"est"x]]))
@@ -5534,7 +5515,7 @@ local report, subreport, status, settarget, setformats, settranslations
local direct, subdirect, writer, pushtarget, poptarget
-if tex and tex.jobname or tex.formatname then
+if tex and (tex.jobname or tex.formatname) then
local valueiskey = { __index = function(t,k) t[k] = k return k end } -- will be helper