diff options
author | 2011-12-12 08:08:18 -0500 | |
---|---|---|
committer | 2011-12-12 08:08:18 -0500 | |
commit | 51bfd53e48d5310eb786069b758e0430129daf54 (patch) | |
tree | 15eedf68fad753b1fad5184c4d018bfced1e4001 /core/events.lua | |
parent | dfacbd6a183f6b09498f589e20f146cbbf332e88 (diff) | |
download | textadept-51bfd53e48d5310eb786069b758e0430129daf54.tar.gz textadept-51bfd53e48d5310eb786069b758e0430129daf54.zip |
Updated to Lua 5.2.
Diffstat (limited to 'core/events.lua')
-rw-r--r-- | core/events.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/events.lua b/core/events.lua index 2145bee4..d6a7b270 100644 --- a/core/events.lua +++ b/core/events.lua @@ -226,9 +226,9 @@ function emit(event, ...) if not event then error(L('Undefined event name')) end local h = handlers[event] if not h then return end - local pcall, unpack, type = pcall, unpack, type + local pcall, table_unpack, type = pcall, table.unpack, type for i = 1, #h do - local ok, result = pcall(h[i], unpack{...}) + local ok, result = pcall(h[i], table_unpack{...}) if not ok then if not error_emitted then error_emitted = true @@ -276,7 +276,7 @@ connect('SCN', function(n) if not f then return end local args = {} for i = 2, #f do args[i - 1] = n[f[i]] end - return emit(f[1], unpack(args)) + return emit(f[1], table.unpack(args)) end) -- Set event constants. |