aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-02-22 19:54:25 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2020-02-22 19:54:25 -0500
commit132d331c8612421a8f95a8b73572b49e27ee38b9 (patch)
tree81b25b7b012e665bd68e2ebe94f8553243f355a6 /init.lua
parent5b2511834db13d21724314c20be06aa71afdee2b (diff)
downloadtextadept-132d331c8612421a8f95a8b73572b49e27ee38b9.tar.gz
textadept-132d331c8612421a8f95a8b73572b49e27ee38b9.zip
Separated `_G.snippets` from `textadept.snippets`.
Removed leading '_' from snippet methods, but kept compatibility for now.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 85963819..b1dc58b0 100644
--- a/init.lua
+++ b/init.lua
@@ -13,6 +13,10 @@ package.cpath = table.concat({
textadept = require('textadept')
+-- Temporary compatibility.
+setmetatable(_L, {__index = function(t, k) return rawget(t, k:gsub('_', '')) or 'No Localization:'..k end})
+setmetatable(textadept.snippets, {__index = function(t, k) return rawget(t, k:gsub('^_', '')) end})
+
-- Documentation is in core/.buffer.luadoc.
local function set_theme(buffer, name, props)
name = name:find('[/\\]') and name or