Re: API Changes

From: Robert <ro....at.web.de>
Date: Mon, 14 Jun 2010 08:57:21 +0200

Hi Mitchell,

I'm typing this using "TA3 alpha" and I think this looks very, very
good. I was about to suggest having a module 'defaults.lua' that would
wrap the core/ext modules to simplify creating an init.lua file.
Moving them to the 'textadept' module is of course much better.

Some thoughts on the changes:
keys.lua: I think it would be better to have separate files for key
commands and the definitions below
"-- Do not edit below this line.". Having a file with custom key
bindings (for example to replicate
the behaviour of another editor or Dvorak keybindings) would then be
possible by simply putting it
in ~/.textadept/modules/textadept/ without having to include the
definitions again.

core/init.lua: Is it still necessary to have _USERHOME..'/?.lua' in the path?

core/events.lua: How about adding a function for removing an event handler with
defaulting to removing the first one:
function disconnect(event, index)
  local plural = event..'s'
  local handlers = events[plural]
  if index then
    table.remove(handlers, index)
  else
    table.remove(handlers, 1)
  end
end

view:split function: Maybe the argument could be changed to a string
"vertical" or "horizontal"?

Command line arguments - would you consider adding command line
switches for setting the location of userhome and
loading? This would be very useful now that I have two incompatible
Textadept versions. Possibly,
-p or --plain for loading Textadept without userhome
-u <path> or --userhome <path> for setting the userhome location

Attached I have some things I found looking through the latest hg.
(Sessions did not work.)

Robert

Received on Mon 14 Jun 2010 - 02:57:21 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:47:43 EST