Skip to content

Instantly share code, notes, and snippets.

@Metaxal
Last active February 6, 2021 10:11
Show Gist options
  • Save Metaxal/2f4a301af488448c9f26a5bf10b1c4c5 to your computer and use it in GitHub Desktop.
Save Metaxal/2f4a301af488448c9f26a5bf10b1c4c5 to your computer and use it in GitHub Desktop.
Save current file and execute it (quickscript)
#lang racket/base
(require quickscript
racket/class)
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(script-help-string "Save file an execute")
(define-script save-and-run
#:label "Save and run"
#:shortcut f5
#:shortcut-prefix (shift)
(λ (selection #:frame drfr #:definitions defs)
(send defs save-file)
(send drfr execute-callback)
#f))
(module url2script-info racket/base
(provide url filename)
(define filename "save-and-run.rkt")
(define url "https://gist.github.com/Metaxal/2f4a301af488448c9f26a5bf10b1c4c5"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment