From 2e042c305207e52831c1d5eb0706e2ebbf94ab1b Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 23 Mar 2010 06:12:30 -0400 Subject: Added textadept.user_dofile to load user files like key commands and snippets. --- core/ext/key_commands.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'core/ext/key_commands.lua') diff --git a/core/ext/key_commands.lua b/core/ext/key_commands.lua index f318c08d..70357a5a 100644 --- a/core/ext/key_commands.lua +++ b/core/ext/key_commands.lua @@ -462,12 +462,7 @@ else keys.cad = { 'del_word_right', b } end --- Load user key commands. -local lfs = require 'lfs' -if lfs.attributes(_USERHOME..'/key_commands.lua') then - local ret, errmsg = pcall(dofile, _USERHOME..'/key_commands.lua') - if not ret then textadept.print(errmsg) end -end +textadept.user_dofile('key_commands.lua') -- load user key commands --- -- This module has no functions. -- cgit v1.2.3