diff --git a/lib/awful/remote.lua.in b/lib/awful/remote.lua.in index d3d7b5e4..c4e1b8ed 100644 --- a/lib/awful/remote.lua.in +++ b/lib/awful/remote.lua.in @@ -6,7 +6,7 @@ -- Grab environment we need require("awful.dbus") -local loadstring = loadstring +local load = loadstring or load -- v5.1 - loadstring, v5.2 - load local tostring = tostring local ipairs = ipairs local table = table @@ -20,7 +20,7 @@ local type = type if dbus then dbus.connect_signal("org.naquadah.awesome.awful.Remote", function(data, code) if data.member == "Eval" then - local f, e = loadstring(code) + local f, e = load(code) if f then results = { f() } retvals = {} diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index b225ec78..74ac127c 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -8,7 +8,7 @@ local os = os local io = io local assert = assert -local loadstring = loadstring +local load = loadstring or load -- v5.1 - loadstring, v5.2 - load local loadfile = loadfile local debug = debug local pairs = pairs @@ -108,7 +108,7 @@ end --- Eval Lua code. -- @return The return value of Lua code. function util.eval(s) - return assert(loadstring(s))() + return assert(load(s))() end local xml_entity_names = { ["'"] = "'", ["\""] = """, ["<"] = "<", [">"] = ">", ["&"] = "&" };