From f2c8ff355edb425230391408cf8e6d38fb359446 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 20 Feb 2008 21:02:30 +0000 Subject: [PATCH] if the function has a name, the name is now used as the name of the keybinding svn: r8744 --- collects/framework/keybinding-lang.ss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/framework/keybinding-lang.ss b/collects/framework/keybinding-lang.ss index 2b5613a1b4..88291a9d6e 100644 --- a/collects/framework/keybinding-lang.ss +++ b/collects/framework/keybinding-lang.ss @@ -29,9 +29,14 @@ proc key)) (set! counter (+ counter 1)) - (let ([name (if (and line col) - (format "~a:~a.~a:~a" src line col counter) - (format "~a:~a:~a" src pos counter))]) + (let ([name + (cond + [(symbol? (object-name proc)) + (format "~a" (object-name proc))] + [(and line col) + (format "~a:~a.~a:~a" src line col counter)] + [else + (format "~a:~a:~a" src pos counter)])]) (send #%keymap add-function name (λ (x y) (let ([end-edit-sequence