aboutsummaryrefslogtreecommitdiff
path: root/core/events.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-04-02 23:35:15 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-04-02 23:35:15 -0400
commit0c4915da62a96bf6db20377ce11fa887b6271ad9 (patch)
tree4bc7d4b0722bce49aebf341841f3ab4fa8ad1dfd /core/events.lua
parentf6705b546d2f037302f2d2d95bae507e78b29d59 (diff)
downloadtextadept-0c4915da62a96bf6db20377ce11fa887b6271ad9.tar.gz
textadept-0c4915da62a96bf6db20377ce11fa887b6271ad9.zip
Code cleanup.
Do not use `ipairs()` and use more consistent variable names among other things.
Diffstat (limited to 'core/events.lua')
-rw-r--r--core/events.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/events.lua b/core/events.lua
index ceba125e..5b7c390a 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -270,6 +270,7 @@ local handlers = {}
-- @see disconnect
-- @name connect
function M.connect(event, f, index)
+ -- Note: cannot assert() here since _L is undefined early in init process.
if not event then error(_L['Undefined event name']) end
if not handlers[event] then handlers[event] = {} end
if handlers[event][f] then M.disconnect(event, f) end