Skip to content

Instantly share code, notes, and snippets.

@zamora
zamora / format-selection.rkt
Last active September 26, 2023 13:54 — forked from alex-hhh/format-selection.rkt
A fixed version of Alex Harsányi's Quickscript that doesn't hang when a single word is longer than the maximum width (as sometimes happens with long URLs)
#lang racket/base
(require quickscript racket/string)
(define prefix-rx #px"^\\s*;+\\s*")
(define fill-column 78)
(define (determine-prefix line)
(define m (regexp-match prefix-rx line))
(if m (car m) ""))
#lang racket/gui
; Main Window
(define frame (new frame% [label "FooChat Deluxe"]
[width 800]
[height 300]))
; Menu Bar
(define menubar (new menu-bar% [parent frame]))
(define file-menu (new menu% [parent menubar] [label "File"]))