From 6a323fe75e102f7cdfaa6fafb6b5497e676aa4ba Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 11:08:23 -0400 Subject: [PATCH] Make the example `rebind' more like other rebinds in Emacs and others. --- collects/scribblings/drracket/keybindings.scrbl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/scribblings/drracket/keybindings.scrbl b/collects/scribblings/drracket/keybindings.scrbl index ac6eeb1749..71bd454679 100644 --- a/collects/scribblings/drracket/keybindings.scrbl +++ b/collects/scribblings/drracket/keybindings.scrbl @@ -239,13 +239,13 @@ name with the new keystroke you want, like this: @racketmod[ s-exp framework/keybinding-lang -(define (rebind name new) - (keybinding - new - (lambda (ed evt) - (send (send ed get-keymap) call-function name ed evt #t)))) +(define (rebind key command) + (keybinding + key + (λ (ed evt) + (send (send ed get-keymap) call-function command ed evt #t)))) -(rebind "backward-kill-word" "c:w") +(rebind "c:w" "backward-kill-word") ] Note that DrRacket does not reload keybindings files automatically when you