diff options
author | 2009-02-08 13:34:59 -0500 | |
---|---|---|
committer | 2009-02-08 13:34:59 -0500 | |
commit | 33e9c58f408be3c42144b28464a029902580031d (patch) | |
tree | 6fe946e6931fd2454545dfd34ba84801b207ec33 /core/init.lua | |
parent | 25b785dfc7f125b66a6ed1fc7b661a2435dc7bf0 (diff) | |
download | textadept-33e9c58f408be3c42144b28464a029902580031d.tar.gz textadept-33e9c58f408be3c42144b28464a029902580031d.zip |
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.
Diffstat (limited to 'core/init.lua')
-rw-r--r-- | core/init.lua | 2 |
1 files changed, 2 insertions, 0 deletions
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 |