beautiful: simplify metatable setting
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
9a270023fe
commit
29702799dc
|
@ -18,8 +18,6 @@ local capi =
|
|||
image = image
|
||||
}
|
||||
|
||||
local module_name = "beautiful"
|
||||
|
||||
--- Theme library
|
||||
module("beautiful")
|
||||
|
||||
|
@ -65,9 +63,9 @@ end
|
|||
--- Get the current theme.
|
||||
-- @return The current theme table.
|
||||
function get()
|
||||
return package.loaded[module_name]
|
||||
return _M
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue