From 6756dabd306ca3d9eedb531844b35ca84443d015 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 13 May 2017 10:39:23 +0100 Subject: Save names of defines for checking later --- lib/lace/builtin.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/lace/builtin.lua b/lib/lace/builtin.lua index 2785389..e7ecd1b 100644 --- a/lib/lace/builtin.lua +++ b/lib/lace/builtin.lua @@ -318,6 +318,10 @@ function builtin.define(compcontext, define, name, controltype, ...) return false, msg end + -- Note the define name for checking by other control types + compcontext._lace.defined = (compcontext._lace.defined or {}) + compcontext._lace.defined[name] = true + -- Successfully created a control table, return a rule for it local rule = { fn = _do_define, -- cgit v1.2.1