Re: [code] Textadept Customization and Upgrades

From: Mitchell <>
Date: Tue, 10 Mar 2020 09:09:14 -0400 (EDT)

Hi Gavin,

On Tue, 10 Mar 2020, Gavin Holt wrote:

> [snip]

I'll address your other questions later, but I can give a quick answer to the following.

> Q3 . I am struggling to reassign a menu entry to a redefined function
> - see new io.open_recent_file() in my init.lua.
> I am trying to alter the table[_L['_File']] but
> I can't iterate to find the right spot to make an alteration.
> Test case "for i,v in pairs([_L['_File']]) do
> print(type(v)) end" returns nothing - despite
> print([_L['_File']]) returning 17!

You need to use the `for i = 1, #menubar[...]` construct to iterate over menus. (`pairs` does not work because menu handing is mostly magic in order to support instantaneous inserting and removing of items.) See this[1] for an example of inserting a "Spellcheck" menu item in alphabetical order in the "Tools" menu.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 10 Mar 2020 - 09:09:14 EDT

This archive was generated by hypermail 2.2.0 : Wed 11 Mar 2020 - 06:45:27 EDT