diff --git a/client.c b/client.c index 7a82bb8fc..6f3f2f93c 100644 --- a/client.c +++ b/client.c @@ -943,7 +943,7 @@ luaA_client_visible_get(lua_State *L) luaA_checkscreen(screen); - deprecate(); + deprecate(L); lua_newtable(L); @@ -1167,7 +1167,7 @@ luaA_client_geometry(lua_State *L) static int luaA_client_coords(lua_State *L) { - deprecate(); + deprecate(L); return luaA_client_geometry(L); } @@ -1208,7 +1208,7 @@ luaA_client_fullgeometry(lua_State *L) static int luaA_client_fullcoords(lua_State *L) { - deprecate(); + deprecate(L); return luaA_client_fullgeometry(L); } diff --git a/hooks.c b/hooks.c index e62aaed96..ed7115083 100644 --- a/hooks.c +++ b/hooks.c @@ -98,7 +98,7 @@ luaA_hooks_mouse_enter(lua_State *L) static int luaA_hooks_mouse_over(lua_State *L) { - deprecate(); + deprecate(L); return luaA_hooks_mouse_enter(L); } diff --git a/luaa.c b/luaa.c index deb88f8f3..fc89fbb29 100644 --- a/luaa.c +++ b/luaa.c @@ -175,7 +175,7 @@ luaA_font(lua_State *L) static int luaA_font_set(lua_State *L) { - deprecate(); + deprecate(L); return luaA_font(L); } @@ -240,7 +240,7 @@ luaA_colors(lua_State *L) static int luaA_colors_set(lua_State *L) { - deprecate(); + deprecate(L); return luaA_colors(L); } diff --git a/luaa.h b/luaa.h index 02e87d94b..c113c6846 100644 --- a/luaa.h +++ b/luaa.h @@ -35,9 +35,8 @@ /** Type for Lua function */ typedef int luaA_ref; -#define deprecate() _warn(__LINE__, \ - __FUNCTION__, \ - "This function is deprecated and will be removed.") +#define deprecate(L) luaA_warn(L, "%s: This function is deprecated and will be removed.", \ + __FUNCTION__) #define DO_LUA_NEW(decl, type, prefix, lua_type, type_ref) \ decl int \ diff --git a/mouse.c b/mouse.c index e0f313146..5bbcac3cd 100644 --- a/mouse.c +++ b/mouse.c @@ -1374,7 +1374,7 @@ luaA_mouse_coords(lua_State *L) static int luaA_mouse_new(lua_State *L) { - deprecate(); + deprecate(L); return luaA_button_new(L); } diff --git a/screen.c b/screen.c index 40169d6cc..82d21dd60 100644 --- a/screen.c +++ b/screen.c @@ -500,7 +500,7 @@ luaA_screen_index(lua_State *L) switch(a_tokenize(buf, len)) { case A_TK_COORDS: - deprecate(); + deprecate(L); case A_TK_GEOMETRY: luaA_pusharea(L, s->geometry); break; diff --git a/statusbar.c b/statusbar.c index df18ba733..81b7ea3b6 100644 --- a/statusbar.c +++ b/statusbar.c @@ -33,7 +33,7 @@ static int luaA_statusbar_new(lua_State *L) { - deprecate(); + deprecate(L); return luaA_wibox_new(L); } diff --git a/titlebar.c b/titlebar.c index 130f9c13e..f4ee6e82c 100644 --- a/titlebar.c +++ b/titlebar.c @@ -157,7 +157,7 @@ titlebar_geometry_compute(client_t *c, area_t geometry, area_t *res) static int luaA_titlebar_new(lua_State *L) { - deprecate(); + deprecate(L); return luaA_wibox_new(L); } diff --git a/widget.c b/widget.c index 39cf9e1c5..d59caa768 100644 --- a/widget.c +++ b/widget.c @@ -358,7 +358,7 @@ widget_invalidate_bywidget(widget_t *widget) static int luaA_widget_mouse_add(lua_State *L) { - deprecate(); + deprecate(L); return 0; } @@ -392,8 +392,8 @@ luaA_widget_new(lua_State *L) if(!a_strcmp(type, "tasklist") || !a_strcmp(type, "taglist")) { - deprecate(); - luaA_warn(L, "requesting old widgets, return a table to allow smooth execution\n"); + deprecate(L); + luaA_warn(L, "requesting old widgets, return a table to allow smooth execution.\n"); lua_newtable(L); lua_pushcfunction(L, luaA_widget_mouse_add); lua_setfield(L, -2, "mouse_add");