aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/file_io.lua4
1 files changed, 4 insertions, 0 deletions
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) <br />
-- Called right before a file is saved to disk.
-- - filename: the filename encoded in UTF-8.
+-- * **file\_after\_save** (filename) <br />
+-- Called right after a file is saved to disk.
+-- - filename: the filename encoded in UTF-8.
-- * **file\_saved_as** (filename) <br />
-- 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.