diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2013-05-15 09:58:04 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2013-05-15 09:58:04 -0400 |
commit | 64ec422c0a6da08710578ae92282cfb4bcb50f5f (patch) | |
tree | d88fbe42a0a25eb3cbe5aac3ea8797037a73b77a /core/args.lua | |
parent | 2e9b654850264d21bf7706ed96b18c3d317e83d1 (diff) |
`_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 'core/args.lua')
-rw-r--r-- | core/args.lua | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/args.lua b/core/args.lua index f0cdba65..bbf4a074 100644 --- a/core/args.lua +++ b/core/args.lua @@ -96,13 +96,8 @@ for i = 1, #arg do end end if not lfs.attributes(userhome) then lfs.mkdir(userhome) end -if not lfs.attributes(userhome..'/init.lua') then - local f = io.open(userhome..'/init.lua', 'w') - if f then - f:write("_M.textadept = require('textadept')\n") - f:close() - end -end +local f = io.open(userhome..'/init.lua', 'a+') -- ensure existence +if f then f:close() end _G._USERHOME = userhome M.register('-u', '--userhome', 1, function() end, 'Sets alternate _USERHOME') |