From 418151f57ebe56b84e35169e73912fe244871db5 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sat, 1 Aug 2009 23:11:41 +0200 Subject: Make all widgets return their worker functions when called. --- mboxc.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mboxc.lua') diff --git a/mboxc.lua b/mboxc.lua index b549b69..73dbe4e 100644 --- a/mboxc.lua +++ b/mboxc.lua @@ -5,6 +5,7 @@ -- {{{ Grab environment local io = { open = io.open } +local setmetatable = setmetatable local string = { find = string.find } -- }}} @@ -55,3 +56,5 @@ function worker(format, mbox) return {total, old, new} end -- }}} + +setmetatable(_M, { __call = function(_, ...) return worker(...) end }) -- cgit v1.2.3