Handle `awful.util.deprecate('Use …')` style (#837)

This commit is contained in:
Daniel Hahler 2016-04-19 22:37:14 +02:00
parent 4d49f76e16
commit 761e244b32
1 changed files with 5 additions and 1 deletions

View File

@ -50,8 +50,12 @@ function util.deprecate(see)
local funcname = info.name or "?"
local msg = "awful: function " .. funcname .. " is deprecated"
if see then
if string.sub(see, 1, 3) == 'Use' then
msg = msg .. ". " .. see
else
msg = msg .. ", see " .. see
end
end
gears_debug.print_warning(msg .. ".\n" .. tb)
end