From 33e9c58f408be3c42144b28464a029902580031d Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 8 Feb 2009 13:34:59 -0500 Subject: Cleaned up code, used argchecks instead of Lua errors, and enhanced stability. Instead of throwing luaL_error() for bad arguments, use luaL_argcheck() and luaL_argerror() for more descriptive messages. Store the 'textadept' table's 'buffers', 'views', 'constants', 'buffer_functions', and 'buffer_properties' tables in the Lua registry and refer to them via metatables so that overwrites are not possible; removed 'rawset' for Lua scripts. --- core/init.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/init.lua') diff --git a/core/init.lua b/core/init.lua index dd36dbd4..f6563c8b 100644 --- a/core/init.lua +++ b/core/init.lua @@ -28,6 +28,8 @@ if not MAC then require 'lua_dialog' end +rawset = nil -- do not allow modifications which could compromise stability + --- -- Checks if the buffer being indexed is the currently focused buffer. -- This is necessary because any buffer actions are performed in the focused -- cgit v1.2.3