diff options
author | 2013-05-15 09:58:04 -0400 | |
---|---|---|
committer | 2013-05-15 09:58:04 -0400 | |
commit | 64ec422c0a6da08710578ae92282cfb4bcb50f5f (patch) | |
tree | d88fbe42a0a25eb3cbe5aac3ea8797037a73b77a /init.lua | |
parent | 2e9b654850264d21bf7706ed96b18c3d317e83d1 (diff) | |
download | textadept-64ec422c0a6da08710578ae92282cfb4bcb50f5f.tar.gz textadept-64ec422c0a6da08710578ae92282cfb4bcb50f5f.zip |
`_M.textadept = require('textadept')` in user init is superfluous.
The module was being loaded by default anyway. Besides, the user's
modules/textadept/init.lua controls which parts are loaded.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -9,8 +9,8 @@ package.path = table.concat({ local so = not WIN32 and '/?.so;' or '/?.dll;' package.cpath = _USERHOME..so.._USERHOME..'/modules'..so..package.cpath -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 +_M.textadept = require('textadept') +local ok, err = pcall(dofile, _USERHOME..'/init.lua') +if not ok and lfs.attributes(_USERHOME..'/init.lua') then gui.print(err) end if not RESETTING then args.process(arg) end |