aboutsummaryrefslogtreecommitdiffhomepage
path: root/init.lua
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-03-16 19:49:05 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-03-16 19:49:05 -0400
commit874b3ef5965170d152c9e702eb7c90075e7ab418 (patch)
tree5d2045a093120259b9fa2248893a90b181b81219 /init.lua
parent1f50b95c871660fc117241b703b2ee42643eea6c (diff)
Moved individual buffer functions in `io` into `buffer`.
e.g. `io.reload_buffer()` was renamed `buffer:reload()`.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index d367fab3..a7352cba 100644
--- a/init.lua
+++ b/init.lua
@@ -10,6 +10,12 @@ package.cpath = table.concat({
package.cpath
}, ';')
+-- Populate initial `_G.buffer` with temporarily exported io functions now that
+-- it exists. This is needed for menus and key bindings.
+for _, name in ipairs{'reload', 'save', 'save_as', 'close'} do
+ buffer[name], io['_' .. name] = io['_' .. name], nil
+end
+
textadept = require('textadept')
-- Temporary compatibility.