diff options
| author | Marius <mariausol@gmail.com> | 2011-08-04 02:00:13 +0300 | 
|---|---|---|
| committer | Marius <mariausol@gmail.com> | 2011-08-04 02:00:13 +0300 | 
| commit | ee4f24d635e0db2029f026a1c098ae76d1e537d3 (patch) | |
| tree | f7556301a37485e08c0476bca6689715e9153f04 /scripts | |
| parent | 5056d7a854142aa63032b0a3ca4d41c496e41faf (diff) | |
| download | context-ee4f24d635e0db2029f026a1c098ae76d1e537d3.tar.gz | |
beta 2011.08.04 00:42
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/context/lua/mtx-context.lua | 5 | ||||
| -rw-r--r-- | scripts/context/lua/mtxrun.lua | 21 | ||||
| -rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 21 | ||||
| -rw-r--r-- | scripts/context/stubs/unix/mtxrun | 21 | 
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 100644 --- 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 | 
