Re: [textadept] Key commands in menu

From: mitchell <c....at.caladbolg.net>
Date: Fri, 29 Jul 2011 11:20:36 -0400 (Eastern Daylight Time)

Robert,

Apologies for the spam, but now that I've gotten over how amazing this
code is and can potentially be, I want to address some of your points
below:

On Thu, 28 Jul 2011, Robert wrote:

> Hi Mitchell,
>
> This is, again, a proof-of-concept (I hope at least). There are lots
> of minor (stylistic) issues that would need to be cleaned up, but
> before working more or on it, I'd like to hear what you think about
> it. Probably all the little helper functions in keys.lua should be
> defined in editing.lua or other files.

Yeah, I'll figure out the best place to put these. Since the string
representation of functions is just the address in memory, location
doesn't matter at this point (genius!!!).

> Another idea I had was to call
> the "menuitem" function only in "read_menu_table",
> and have only tables in the menubar table. That way the creation of
> the shortcut lookup
> table could be done when calling "read_menu_table", now it needs
> to be done before the calls to "menuitem".

I agree. I created menuitem() so I wouldn't have to write { L('gtk-new'),
new_buffer, K['gtk-new'] } a bajillion times for all menu items. Since
your code doesn't rely on such things, the old table style can be
restored.

> I had to include additional buffer functions assignments (in gui.lua),
> similar to what is done with buffer.save and other Lua functions.
> Otherwise it was not possible to create identical string
> representations for these buffer functions. An alternative would be
> the older string based approach.

No, I like your idea better.

> I also moved "Select command" to
> gui.lua, this could of course be done in a much cleaner way, but for
> now it works.

As mentioned earlier, I'll figure out the best place to put these
functions.

Thanks so much for your contributions!

mitchell
Received on Fri 29 Jul 2011 - 11:20:36 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:04:16 EST