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
|
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
|
||||||
|
|
Loading…
Reference in New Issue