[plt-scheme] Overriding the keymap in drscheme

From: Robby Findler (robby at cs.uchicago.edu)
Date: Thu Jul 27 18:39:14 EDT 2006

At Thu, 27 Jul 2006 13:57:17 -0700 (PDT), Danny Yoo wrote:
> On Tue, 25 Jul 2006, Robby Findler wrote:
> > I wonder if another approach might make more sense for you (like
> > overriding on-insert/after-insert or maybe on-event). Perhaps you can
> > explain the bigger picture a little bit (like what the diva scheme
> > keymap binds and why chained keymaps are a problem)?
> DivaScheme lets you edit scheme code without ever having to manually 
> balance parentheses.  Conversely, DivaScheme assumes that the parentheses 
> are correctly balanced, else it complains and aborts out to normal 
> DrScheme.
> What's happening is that DivaScheme has a special keybinding for pretty 
> much everything.  Any key that touches the text needs to go through 
> DivaScheme, else it might break the parentheses.  DivaScheme needs to 
> override the '[' key, it needs to override 'delete' and 'backspace', etc.
> On the other hand, DivaScheme needs to maintain keybindings that do not 
> touch the text.  We want C-x C-s to work as usual, F5 and F6 too, etc.
> In this sense, DivaScheme is a major mode, if I can use Emacs terminology, 
> and CHAIN-TO-KEYMAP works like Emacs' minor modes.

The above sounds like you want to override on-insert and after-insert
(and the deletes), rather than using keymaps.

Does that not work for some reason?


Posted on the users mailing list.