From 5b53aaa9b9c1603a679b59ee76ab3f85abb9fadf Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 30 Nov 2010 20:04:43 -0500 Subject: Added 'file_after_save' event. --- core/file_io.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core') diff --git a/core/file_io.lua b/core/file_io.lua index 574ea6a2..e053144c 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -39,6 +39,9 @@ module('io', package.seeall) -- * **file\_before\_save** (filename)
-- Called right before a file is saved to disk. -- - filename: the filename encoded in UTF-8. +-- * **file\_after\_save** (filename)
+-- Called right after a file is saved to disk. +-- - filename: the filename encoded in UTF-8. -- * **file\_saved_as** (filename)
-- Called when a file is saved under another filename. -- - filename: the other filename encoded in UTF-8. @@ -239,6 +242,7 @@ local function save(buffer) buffer:set_save_point() buffer.modification_time = lfs.attributes(filename).modification if buffer._type then buffer._type = nil end + events.emit('file_after_save', buffer.filename) end -- LuaDoc is in core/.buffer.luadoc. -- cgit v1.2.3