From 874b3ef5965170d152c9e702eb7c90075e7ab418 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 16 Mar 2020 19:49:05 -0400 Subject: Moved individual buffer functions in `io` into `buffer`. e.g. `io.reload_buffer()` was renamed `buffer:reload()`. --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'init.lua') 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. -- cgit v1.2.3