diff options
author | 2011-06-24 17:41:51 -0400 | |
---|---|---|
committer | 2011-06-24 17:41:51 -0400 | |
commit | e192e73a92eb896f9c8623d11a8c49ebbcb4c291 (patch) | |
tree | 7c09774b3fa143126e8373c2a0c3d901f3e7273c /core/events.lua | |
parent | 282c7dd9fe5c903a4620d41c9498153e83867119 (diff) | |
download | textadept-e192e73a92eb896f9c8623d11a8c49ebbcb4c291.tar.gz textadept-e192e73a92eb896f9c8623d11a8c49ebbcb4c291.zip |
Removed '_G' prefix from globals where necessary.
Diffstat (limited to 'core/events.lua')
-rw-r--r-- | core/events.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/events.lua b/core/events.lua index 022ccad1..6b8ac99b 100644 --- a/core/events.lua +++ b/core/events.lua @@ -1,6 +1,6 @@ -- Copyright 2007-2011 Mitchell mitchell<att>caladbolg.net. See LICENSE. -local L = _G.locale.localize +local L = locale.localize --- -- Textadept's core event structure and handlers. @@ -132,9 +132,9 @@ module('events', package.seeall) -- * `find_text`: The text to search for. -- * `repl_text`: The text to replace found text with. -- * `RESET_AFTER`: Called after resetting the Lua state. This is triggered by --- `_G.reset()`. +-- `reset()`. -- * `RESET_BEFORE`: Called before resetting the Lua state. This is triggered by --- `_G.reset()`. +-- `reset()`. -- * `SAVE_POINT_LEFT`: Called when a save point is left. -- * `SAVE_POINT_REACHED`: Called when a save point is entered. -- * `UPDATE_UI`: Called when either the text or styling of the buffer has @@ -211,7 +211,7 @@ 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 = _G.pcall, _G.unpack, _G.type + local pcall, unpack, type = pcall, unpack, type for i = 1, #h do local ok, result = pcall(h[i], unpack{...}) if not ok then |