diff options
Diffstat (limited to 'tex/context/base/strc-mar.lua')
-rw-r--r-- | tex/context/base/strc-mar.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tex/context/base/strc-mar.lua b/tex/context/base/strc-mar.lua index 66ec04739..c7ef2d4e1 100644 --- a/tex/context/base/strc-mar.lua +++ b/tex/context/base/strc-mar.lua @@ -83,7 +83,7 @@ local function resolve(t,k) if trace_marks_set or trace_marks_get then report_marks("undefined: name=%s",k) end - local crap = { autodefined = true } + local crap = { autodefined = true } -- maybe set = 0 and reset = 0 t[k] = crap return crap else @@ -264,13 +264,16 @@ function marks.set(name,value) dn = data[name] end dn.set = topofstack + if not dn.reset then + dn.reset = 0 -- in case of selfdefined + end local top = stack[topofstack] local new = { } if top then for k, v in next, top do local d = data[k] - local r = d.reset - local s = d.set + local r = d.reset or 0 + local s = d.set or 0 if r <= topofstack and s < r then new[k] = false else @@ -689,6 +692,6 @@ commands.fetchtwomarks = marks.fetchtwomarks commands.fetchallmarks = marks.fetchallmarks function commands.doifelsemarking(str) -- can be shortcut - commands.testcase(marks.exists(str)) + commands.doifelse(marks.exists(str)) end |