Re: [code] [textadept] Key module and Menu module

From: Qwerky <>
Date: Wed, 3 Jul 2019 16:34:15 -0600

Thanks.  Presently, menu.lua calls functions directly, and keys.lua
(besides already calling some functions directly) calls menu entries
which then call functions.  What if those keys.lua functions simply
called the same functions which the menu entries call, so that neither
keys.lua or menu.lua would call the other?  Would that work?


On 2019-07-03 16:23, Mitchell wrote:
> Hi,
> If you edit menu.lua, then that will require keys.lua changes, since
> menu.lua is loaded first, and then keys.lua is loaded next.
> One could make the argument that it would be better to use dedicated
> functions and then reference them from menus, but (1) where should
> those dedicated functions be placed? They don't really fit into any
> module; (2) editing menu.lua in the way you describe is rarely done;
> and (3) having inline menu functions simplifies the code and reduces
> line count (thus increasing minimalism).
> Cheers,
> Mitchell
> On Wed, 3 Jul 2019, Qwerky wrote:
>> Hi.  In editing a copy of "keys.lua" to create a preferred layout, I
>> notice
>> that many commands reference the "menu.lua" module, and in particular
>> specific menu entries, by name including exact case and hotkey
>> indicators.
>> If one were to edit (a copy of) the "menu.lua" module, would that then
>> require editing "keys.lua" to match those changed menu entries?
>> If so, would it be better, while editing "keys.lua", to replace the menu
>> references, with the actual functions that those respective menu entries
>> reference?
>> qwerky
> Mitchell

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 03 Jul 2019 - 18:34:15 EDT

This archive was generated by hypermail 2.2.0 : Thu 04 Jul 2019 - 06:30:53 EDT