aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/session.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-06-23 22:35:20 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-06-23 22:35:20 -0400
commite22d2bf663a4cc4fbeed5730c8f0ec7a446e43c8 (patch)
tree76df894b4f5468c3d85d990129e1e13b890e4ea9 /modules/textadept/session.lua
parent79a37f07e3f57694a436db9a25e296c8d177041a (diff)
downloadtextadept-e22d2bf663a4cc4fbeed5730c8f0ec7a446e43c8.tar.gz
textadept-e22d2bf663a4cc4fbeed5730c8f0ec7a446e43c8.zip
Use string constants for event names.
Diffstat (limited to 'modules/textadept/session.lua')
-rw-r--r--modules/textadept/session.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua
index fbda6ae9..a92ceb3e 100644
--- a/modules/textadept/session.lua
+++ b/modules/textadept/session.lua
@@ -49,7 +49,7 @@ function load(filename)
else
new_buffer()
buffer._type = filename
- events.emit('file_opened', filename)
+ events.emit(events.FILE_OPENED, filename)
end
-- Restore saved buffer selection and view.
local anchor = tonumber(anchor) or 0
@@ -166,7 +166,7 @@ function save(filename)
end
end
-events.connect('quit', function() if SAVE_ON_QUIT then save() end end, 1)
+events.connect(events.QUIT, function() if SAVE_ON_QUIT then save() end end, 1)
local function no_session() SAVE_ON_QUIT = false end
args.register('-n', '--nosession', 0, no_session, 'No session functionality')