Created
July 23, 2023 19:35
-
-
Save shhyou/acdd91872a6b510adf71b98b49e93167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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