beautiful: simplify metatable setting

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-12-02 15:56:43 +01:00
parent 9a270023fe
commit 29702799dc
1 changed files with 2 additions and 4 deletions

View File

@ -18,8 +18,6 @@ local capi =
image = image image = image
} }
local module_name = "beautiful"
--- Theme library --- Theme library
module("beautiful") module("beautiful")
@ -65,9 +63,9 @@ end
--- Get the current theme. --- Get the current theme.
-- @return The current theme table. -- @return The current theme table.
function get() function get()
return package.loaded[module_name] return _M
end end
setmetatable(package.loaded[module_name], package.loaded[module_name]) setmetatable(_M, _M)
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80