mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-16 06:52:10 +01:00
23 lines
683 B
Text
23 lines
683 B
Text
;;; vim: ft=commonlisp
|
|
;; Config file for cl-repl (yes, WTF)
|
|
|
|
(defpackage :repl-user
|
|
(:use :cl :cl-repl)
|
|
(:import-from cl-repl *magic-commands*))
|
|
(in-package :repl-user)
|
|
|
|
(define-magic swank (&rest args)
|
|
(declare (ignore args))
|
|
"Start a SWANK server."
|
|
(ql:quickload :swank)
|
|
;; Needs to be an eval since swank package isn't loaded at compile-time
|
|
(let ((port (eval (read-from-string "(swank:create-server :dont-close t)"))))
|
|
(cl-repl:message-from-magic "Started SWANK server on port ~A" port)))
|
|
|
|
;; Remove bullshit commands
|
|
(delete-if
|
|
(lambda (cmd)
|
|
(let ((name (car cmd)))
|
|
(or (string= name "%python")
|
|
(string= name "%perl"))))
|
|
*magic-commands*)
|