X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fioncore_misc.lua;h=a392c5344e99a6197214f5672d325d72d1f69e68;hp=17817659ff5a3af12f153570f443c37acdce2d54;hb=20070708;hpb=1cd244db6df1337d594b9e2456c735cbc28aea6c diff --git a/ioncore/ioncore_misc.lua b/ioncore/ioncore_misc.lua index 1781765..a392c53 100644 --- a/ioncore/ioncore_misc.lua +++ b/ioncore/ioncore_misc.lua @@ -82,7 +82,10 @@ end -- depends on the types of attached regions and whether \var{reg} -- implements \code{attach_framed} and \code{attach}. If \var{param} -- is not set, the default of \verb!{switchto=true}! is used. +-- The function returns \code{true} if all tagged regions were +-- succesfully attached, and \code{false} otherwisse. function ioncore.tagged_attach(reg, param) + local errors=false if not param then param={switchto=true} end @@ -92,9 +95,9 @@ function ioncore.tagged_attach(reg, param) or reg.attach) if not (fn and fn(reg, r, param)) then - return false + errors=true end end - return true + return not errors end