From ee9e8700ae84aa246ec01422aef83b673b5b1cf7 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 8 Nov 2019 23:50:57 -0500 Subject: API file lists and Lua tags lists can contain functions that return file paths. This gives more control over when to include certain autocompletion and documentation files like Textadept's API. --- modules/textadept/command_entry.lua | 9 --------- 1 file changed, 9 deletions(-) (limited to 'modules/textadept/command_entry.lua') diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index b506757a..d858f071 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -203,21 +203,12 @@ events.connect(events.INITIALIZED, function() for key, f in pairs(keys) do if f == textadept.editing.show_documentation then lua_mode_keys[key] = function() - -- Enable Textadept API documentation unless the Lua module already - -- enabled it. - local api_files = textadept.editing.api_files - if not api_files.lua[_HOME] then - api_files.lua[#api_files.lua + 1] = _HOME..'/modules/lua/ta_api' - end -- Temporarily change _G.buffer since ui.command_entry is the "active" -- buffer. local orig_buffer = _G.buffer _G.buffer = ui.command_entry textadept.editing.show_documentation() _G.buffer = orig_buffer - -- Disable Textadept API documentation unless the Lua module previously - -- enabled it. - if not api_files.lua[_HOME] then api_files.lua[#api_files.lua] = nil end end break end -- cgit v1.2.3