aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-07-21 09:34:51 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-07-21 09:34:51 -0400
commit5a50a7e55b870ae66a6bb69fcd3a7bd1841f3d9b (patch)
tree7b7d99c5a42cf7597d00815f941b8070439f32d7 /init.lua
parent53de5fafa2344ae17a0457a34c7a6a866f1020d1 (diff)
downloadtextadept-5a50a7e55b870ae66a6bb69fcd3a7bd1841f3d9b.tar.gz
textadept-5a50a7e55b870ae66a6bb69fcd3a7bd1841f3d9b.zip
Lua code cleanup and API changes.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index bf688019..7edee90a 100644
--- a/init.lua
+++ b/init.lua
@@ -7,6 +7,8 @@ package.path = table.concat({
package.path
}, ';');
-if not user_dofile('init.lua') then require 'textadept' end
+local user_init, exists = _USERHOME..'/init.lua', lfs.attributes
+local ok, err = pcall(dofile, user_init)
+if ok or not exists(user_init) then require 'textadept' else gui.print(err) end
if not RESETTING then args.process(arg) end