diff options
author | 2010-03-29 19:04:32 -0400 | |
---|---|---|
committer | 2010-03-29 19:04:32 -0400 | |
commit | 1177ef981b04a0c368ab4cbad5e0f6bfdd252cb6 (patch) | |
tree | 16feac1865912f20d3a5334a9a80c7849f6d4499 /core | |
parent | 9583dadb72798bddcf14260d263a2b3b9ac451a3 (diff) | |
download | textadept-1177ef981b04a0c368ab4cbad5e0f6bfdd252cb6.tar.gz textadept-1177ef981b04a0c368ab4cbad5e0f6bfdd252cb6.zip |
Use textadept.user_dofile() for user init.lua.
Diffstat (limited to 'core')
-rw-r--r-- | core/.textadept.lua | 2 | ||||
-rw-r--r-- | core/init.lua | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/.textadept.lua b/core/.textadept.lua index ec6d9622..5fe9776d 100644 --- a/core/.textadept.lua +++ b/core/.textadept.lua @@ -131,5 +131,7 @@ function dialog(kind, ...) end --- -- Calls 'dofile' on the given filename in the user's Textadept directory. -- This is typically used for loading user files like key commands or snippets. +-- Errors are printed to the Textadept message buffer. -- @param filename The name of the file (not path). +-- @return true if successful; false otherwise. function user_dofile(filename) end diff --git a/core/init.lua b/core/init.lua index 7576e660..505a3b45 100644 --- a/core/init.lua +++ b/core/init.lua @@ -105,5 +105,7 @@ 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 + return ret end + return false end |