ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* error messages for callback.register
@ 2010-04-09 11:17 Peter Münster
  0 siblings, 0 replies; only message in thread
From: Peter Münster @ 2010-04-09 11:17 UTC (permalink / raw)
  To: ConTeXt list

Hello,

Here a patch for luat-cbk.lua:

function callbacks.register(name,func,freeze)
    if frozen[name] then
        if trace_callbacks then
            frozenmessage("registering",name)
        end
        return nil, name .. " is frozen"
    elseif freeze then
        frozen[name] = (type(freeze) == "string" and freeze) or "registered"
        return register_callback(name,func)
    else
        return register_callback(name,func)
    end
end

function callback.register(name,func) -- original
    if frozen[name] then
        if trace_callbacks then
            frozenmessage("registering",name)
        end
        return nil, name .. " is frozen"
    else
        return register_callback(name,func)
    end
end

(Untested...)

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-09 11:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09 11:17 error messages for callback.register Peter Münster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).