diff options
Diffstat (limited to 'core/init.lua')
-rw-r--r-- | core/init.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/init.lua b/core/init.lua index b55a3f04..7576e660 100644 --- a/core/init.lua +++ b/core/init.lua @@ -99,3 +99,11 @@ function textadept.switch_buffer() local i = tonumber(out:match('%-?%d+$')) if i and i >= 0 then view:goto_buffer(i + 1, true) end end + +-- LuaDoc is in core/.textadept.lua. +function textadept.user_dofile(filename) + if lfs.attributes(_USERHOME..'/'..filename) then + local ret, errmsg = pcall(dofile, _USERHOME..'/'..filename) + if not ret then textadept.print(errmsg) end + end +end |