Could Emacs be rewritten in Python?
Greg Ewing (using news.cis.dfn.de)
ckea25d02 at sneakemail.com
Fri Apr 18 05:34:38 CEST 2003
Patrick K. O'Brien wrote:
> Assuming I had the
> mechanism in place to bind keystrokes to a user-created command, how
> would I know what parameters that command expected?
I think there's a mistake here in thinking of commands
as being bound to keystrokes and nothing else. It
would be better to think in terms of handlers for
keystrokes being bound to particular objects, or
classes of objects.
For instance, a command that operated on the text
in a buffer would be attached to the Buffer class,
and one that operated on a window would be
attached to the Window class.
So the command for binding a command wouldn't
just say "bind this function to this key", it
would say "bind this function to an occurrence
of this key being received by this class of
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
More information about the Python-list