summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-05-13 10:39:23 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-05-13 10:39:23 +0100
commit6756dabd306ca3d9eedb531844b35ca84443d015 (patch)
tree86b0a71a5f609ba2e8bca5791fe86e5347cc6329
parent3ba09da3af9b59cdd1f54626253c3cf67a41a4e7 (diff)
downloadlace-6756dabd306ca3d9eedb531844b35ca84443d015.tar.gz
Save names of defines for checking later
-rw-r--r--lib/lace/builtin.lua4
1 files changed, 4 insertions, 0 deletions
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,