diff options
author | Marius <mariausol@gmail.com> | 2012-06-20 21:00:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-06-20 21:00:13 +0300 |
commit | 74ee3251df8c455d72f79887068b40c5b75a01c9 (patch) | |
tree | 182e025ee371ddb2ab7fc6b7f4fa403ed07458e4 | |
parent | 7f94b11435ebc551709e20c1112eae2492ef1583 (diff) | |
download | context-74ee3251df8c455d72f79887068b40c5b75a01c9.tar.gz |
beta 2012.06.20 19:47
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4141 -> 4144 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 106187 -> 106628 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/file-res.lua | 4 | ||||
-rw-r--r-- | tex/context/base/mult-aux.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mult-aux.mkiv | 95 | ||||
-rw-r--r-- | tex/context/base/mult-ini.lua | 14 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24427 -> 24467 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 182130 -> 182165 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
13 files changed, 101 insertions, 24 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 9f6ad7e5b..e6c22404a 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.06.20 16:19} +\newcontextversion{2012.06.20 19:47} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 0d906a955..63d1e8423 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.06.20 16:19} +\newcontextversion{2012.06.20 19:47} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex c1cde20ef..0504f0826 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex e740b41d1..23f520843 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index beedad054..101429c8f 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.06.20 16:19} +\edef\contextversion{2012.06.20 19:47} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 968bd1b58..d37481285 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.06.20 16:19} +\edef\contextversion{2012.06.20 19:47} %D For those who want to use this: diff --git a/tex/context/base/file-res.lua b/tex/context/base/file-res.lua index 4687e140e..4676eec92 100644 --- a/tex/context/base/file-res.lua +++ b/tex/context/base/file-res.lua @@ -76,9 +76,9 @@ local function readfilename(specification,backtrack,treetoo) local fname = paths[i] .. "/" .. names[i] if isfile(fname) then if trace_files then - report_files("found on extra path: %s",name) + report_files("found on extra path: %s",fname) end - fnd = name + fnd = fname break end end diff --git a/tex/context/base/mult-aux.lua b/tex/context/base/mult-aux.lua index e0fd87a02..911888991 100644 --- a/tex/context/base/mult-aux.lua +++ b/tex/context/base/mult-aux.lua @@ -43,7 +43,7 @@ function namespaces.define(namespace,settings) local self = "\\" .. prefix .. namespace context.unprotect() -- context.installnamespace(namespace) - context("\\def\\%s%s{%s%s}",prefix,namespace,meaning,namespace) + context("\\def\\%s%s{%s%s}",prefix,namespace,meaning,namespace) -- or context.setvalue if trace_namespaces then report_namespaces("using namespace '%s' for '%s'",namespace,name) end diff --git a/tex/context/base/mult-aux.mkiv b/tex/context/base/mult-aux.mkiv index 9cc2e943d..fae9bb0c8 100644 --- a/tex/context/base/mult-aux.mkiv +++ b/tex/context/base/mult-aux.mkiv @@ -93,10 +93,6 @@ \expandafter\mult_interfaces_get_parameters_indeed \fi#2} -% \def\mult_interfaces_get_parameters#1% we can assume that the test already happened -% {\def\m_mult_interfaces_namespace{#1}% -% \mult_interfaces_get_parameters_indeed} - \def\mult_interfaces_get_parameters_indeed#1]% namespace already set {\mult_interfaces_get_parameters_item#1,],\@relax@} @@ -125,10 +121,11 @@ \newif\ifassignment -\def\mult_check_for_assignment#1=#2#3\_end_ - {\expandafter\if\detokenize{#2}@\assignmentfalse\else\assignmenttrue\fi} +\def\mult_check_for_assignment_indeed#1=#2#3\_end_ + {\if#2@\assignmentfalse\else\assignmenttrue\fi} -% usage: \mult_check_for_assignment##1=@@_end_ +\def\mult_check_for_assignment#1% + {\expandafter\mult_check_for_assignment_indeed\detokenize{#1}=@@\_end_} % End of experimental code. @@ -251,6 +248,37 @@ \let\definehandlerparent\empty +% \unexpanded\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% +% {\ifx#4\relax\let#4\empty\fi +% \unexpanded\def#2{\dotripleempty#5}% +% \newtoks#6% +% \newtoks#7% +% \def#5[##1][##2][##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child] +% {\let#9#4% +% \edef#4{##1}% +% \ifthirdargument +% \the#6% predefine +% \edef#8{##2}% +% \mult_interfaces_get_parameters{#1#4:}[\s!parent=#1##2,##3]% +% \else\ifsecondargument +% \the#6% predefine +% % \mult_check_for_assignment{##2}% +% \expandafter\mult_check_for_assignment_indeed\detokenize{##2}=@@\_end_ +% \ifassignment +% \let#8\empty +% \mult_interfaces_get_parameters{#1#4:}[\s!parent=#3,##2]% +% \else +% \edef#8{##2}% +% \mult_interfaces_get_parameters{#1#4:}[\s!parent=#1##2]% +% \fi +% \else +% \the#6% predefine +% \let#8\empty +% \mult_interfaces_get_parameters{#1#4:}[\s!parent=#3]% +% \fi\fi +% \the#7% +% \let#4#9}} + \unexpanded\def\mult_interfaces_install_define_handler#1#2#3#4#5#6#7#8#9% {\ifx#4\relax\let#4\empty\fi \unexpanded\def#2{\dotripleempty#5}% @@ -259,22 +287,26 @@ \def#5[##1][##2][##3]% [child][parent][settings] | [child][settings] | [child][parent] | [child] {\let#9#4% \edef#4{##1}% - \the#6% predefine \ifthirdargument + \the#6% predefine \edef#8{##2}% - \mult_interfaces_get_parameters{#1#4:}[\s!parent=#1##2,##3]% + \expandafter\def\csname#1#4:\s!parent\endcsname{#1##2}% + \mult_interfaces_get_parameters{#1#4:}[##3]% \else\ifsecondargument - \mult_check_for_assignment##2=@@\_end_ + \the#6% predefine + \expandafter\mult_check_for_assignment_indeed\detokenize{##2}=@@\_end_ \ifassignment \let#8\empty - \mult_interfaces_get_parameters{#1#4:}[\s!parent=#3,##2]% + \expandafter\def\csname#1#4:\s!parent\endcsname{#3}% + \mult_interfaces_get_parameters{#1#4:}[##2]% \else \edef#8{##2}% - \mult_interfaces_get_parameters{#1#4:}[\s!parent=#1##2]% + \expandafter\def\csname#1#4:\s!parent\endcsname{#1##2}% \fi \else + \the#6% predefine \let#8\empty - \mult_interfaces_get_parameters{#1#4:}[\s!parent=#3]% + \expandafter\def\csname#1#4:\s!parent\endcsname{#3}% \fi\fi \the#7% \let#4#9}} @@ -354,7 +386,8 @@ \ifx#3#6\the#8\fi % only switchsetups if previous == current \let#3#7% \else\iffirstargument - \mult_check_for_assignment##1=@@\_end_ % \docheckassignment{##1}% +% \mult_check_for_assignment{##1}% +\expandafter\mult_check_for_assignment_indeed\detokenize{##1}=@@\_end_ \ifassignment % \setuplayout[key=value] \let#7#3% @@ -403,6 +436,33 @@ \expandafter\noexpand\csname everyswitch#2\endcsname \expandafter\noexpand\csname everysetup#2root\endcsname}} +% \unexpanded\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8% +% {\ifx#3\relax\let#3\empty\fi +% \unexpanded\def#2{\dotripleempty#4}% +% \unexpanded\def#6{\mult_interfaces_get_parameters{#1#3:}}% +% \newtoks#5% +% \def#4[##1][##2][##3]% +% {\let#8#3% +% \ifthirdargument +% \def\mult_interfaces_with_comma_list_element####1% +% {\edef#3{####1}% +% \mult_interfaces_get_parameters{#1#3:}[\s!parent=#1##2,##3]% always sets parent +% \the#5}% +% \processcommalist[##1]\mult_interfaces_with_comma_list_element +% \else\ifsecondargument +% \def\mult_interfaces_with_comma_list_element####1% +% {\edef#3{####1}% +% #7% checks parent and sets if needed +% \mult_interfaces_get_parameters{#1#3:}[##2]% +% \the#5}% +% \processcommalist[##1]\mult_interfaces_with_comma_list_element +% \else +% \let#3\empty +% \mult_interfaces_get_parameters{#1:}[##1]% +% \the#5% +% \fi\fi +% \let#3#8}} + \unexpanded\def\mult_interfaces_install_auto_setup_handler#1#2#3#4#5#6#7#8% {\ifx#3\relax\let#3\empty\fi \unexpanded\def#2{\dotripleempty#4}% @@ -413,7 +473,8 @@ \ifthirdargument \def\mult_interfaces_with_comma_list_element####1% {\edef#3{####1}% - \mult_interfaces_get_parameters{#1#3:}[\s!parent=#1##2,##3]% always sets parent + \expandafter\def\csname#1#3:\s!parent\endcsname{#1##2}% + \mult_interfaces_get_parameters{#1#3:}[##3]% always sets parent \the#5}% \processcommalist[##1]\mult_interfaces_with_comma_list_element \else\ifsecondargument @@ -635,6 +696,10 @@ \ctxcommand{registernamespace(\number\c_mult_interfaces_n_of_namespaces,"#1")}% \fi} +\def\mult_interfaces_get_parameters_error#1#2#3% redefined + {\ctxcommand{showassignerror("#1","#2","#3",\the\inputlineno)}% + \waitonfatalerror} + % We install two core namespaces here, as we want nice error messages. Maybe % we will reserve the first 9. diff --git a/tex/context/base/mult-ini.lua b/tex/context/base/mult-ini.lua index d14f38ad5..ddd98caf1 100644 --- a/tex/context/base/mult-ini.lua +++ b/tex/context/base/mult-ini.lua @@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['mult-ini'] = { license = "see context related readme files" } -local format, gmatch, gsub = string.format, string.gmatch, string.gsub +local format, gmatch, gsub, match = string.format, string.gmatch, string.gsub, string.match local lpegmatch = lpeg.match local serialize = table.serialize @@ -85,6 +85,18 @@ local function resolve(t,k) return v end +function commands.showassignerror(namespace,key,value,line) + local ns, instance = match(namespace,"^(%d+)[^%a]+(%a+)") + if ns then + namespace = corenamespaces[tonumber(ns)] or ns + end + if instance then + context.writestatus("setup",format("error in line %s, namespace %q, instance %q, key %q",line,namespace,instance,key)) + else + context.writestatus("setup",format("error in line %s, namespace %q, key %q",line,namespace,key)) + end +end + setmetatableindex(reporters, resolve) for category, _ in next, translations do diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex ab9ad4f3f..fb95ec439 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 46bf5c1a4..9785f6cb3 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 139a8ee2c..0ab2b74aa 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 06/20/12 16:19:05 +-- merge date : 06/20/12 19:47:09 do -- begin closure to overcome local limits and interference |