diff options
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 |