[plt-scheme] Overriding insert-lambda-template keybinding?

From: Grant Rettke (grettke at acm.org)
Date: Wed Feb 13 23:11:30 EST 2008

Hi folks,

In v372 I want to modify the insert-lambda-template keybinding so that
it will use the word lambda rather than the symbol. To do so I added
this key binding:

; $LastChangedDate: 2008-02-13 22:05:25 -0600 (Wed, 13 Feb 2008) $
; $LastChangedRevision: 1260 $
; $HeadURL: svn://osiris/drscheme/tags/1.0/mykeys.ss $
(module mykeys (lib "keybinding-lang.ss" "framework")

  ; Use the word lambda rather than the lambda symbol
  ; Source code
  ;  Url: http://svn.plt-scheme.org/plt/tags/v372/collects/framework/private/keymap.ss
  ;  Lines: 375-385 (insert-lambda-template)
  (keybinding
   "ESC;s:l"
   (lambda (edit event)
     (send edit begin-edit-sequence)
     (let ([selection-start (send edit get-start-position)])
       (send edit set-position (send edit get-end-position))
       (send edit insert ")")
       (send edit set-position selection-start)
       (send edit insert ") ")
       (send edit set-position selection-start)
       (send edit insert "(lambda ("))
     (send edit end-edit-sequence))))

Is there an easier way to do it? Could/should I have modified
keymap.ss and re-built DrScheme locally?

In the keybindings display window the custom mapping shows up as
"ESC;c:l (C:\drscheme\mykeys.ss:10.2:1). What do those numbers mean?
Is there any way to make this more meaningful?

Is that mapping loaded each time DrScheme starts or can I delete it?

Best wishes,

Grant Rettke

-- 
http://www.wisdomandwonder.com/


Posted on the users mailing list.