aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-05-15 09:58:04 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-05-15 09:58:04 -0400
commit64ec422c0a6da08710578ae92282cfb4bcb50f5f (patch)
treed88fbe42a0a25eb3cbe5aac3ea8797037a73b77a /init.lua
parent2e9b654850264d21bf7706ed96b18c3d317e83d1 (diff)
downloadtextadept-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.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 55b8b2f2..2c2344cb 100644
--- a/init.lua
+++ b/init.lua
@@ -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