Skip to content

Instantly share code, notes, and snippets.

@shhyou
Created July 23, 2023 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shhyou/acdd91872a6b510adf71b98b49e93167 to your computer and use it in GitHub Desktop.
Save shhyou/acdd91872a6b510adf71b98b49e93167 to your computer and use it in GitHub Desktop.
#!/usr/bin/env racket
#lang racket/base
(require racket/file)
(provide cleanup-pref-keys)
(define cleanup-pref-keys
'((plt:framework-pref:drracket:recently-closed-tabs ())
(plt:framework-pref:drracket:console-previous-exprs ())
(readline-input-history ())
(plt:framework-pref:drracket:most-recent-lang-line "#lang racket/base\n")))
(module+ main
(require racket/pretty)
(pretty-write
(for/hash ([key (in-list (map car cleanup-pref-keys))])
(values key (get-preference key (λ () #f)))))
(put-preferences
(map car cleanup-pref-keys)
(map cadr cleanup-pref-keys))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment