[racket] closing tab in Unix?

From: John Clements (clements at brinckerhoff.org)
Date: Thu Oct 3 16:37:39 EDT 2013

On Oct 2, 2013, at 10:15 AM, Laurent wrote:

> You can use Ctrl-W if you enable "Keyboard shortcuts in menus" (or whatever the english string) in Edit/Preferences/General but then you may lose some emacs keybindings.
> 
> Otherwise, you can get hold of the drracket-frame from a custom keybinding, by first getting the editor from the callback argument, calling (send editor get-top-level-window) to get the frame, then close the tab (only partially tested):
> 
> (keybinding
>    "c:s:w"
>    (λ (ed evt)
>    (when (is-a? ed text:basic<%>)
>     (define fr (send ed get-top-level-window))
>     (when fr (send fr close-current-tab)))))
> 
> Example partly taken from here:
> http://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html#%28part._defining-shortcuts%29

Thanks! Is it reasonable to take this as evidence that I'm the only one out there trying to use linux DrRacket with emacs-only bindings :) ?

John



Posted on the users mailing list.