From 5a50a7e55b870ae66a6bb69fcd3a7bd1841f3d9b Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 21 Jul 2012 09:34:51 -0400 Subject: Lua code cleanup and API changes. --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'init.lua') 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 -- cgit v1.2.3