dotfiles/.replrc

24 lines
683 B
Text
Raw Normal View History

2023-05-13 18:51:31 +02:00
;;; 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
2023-05-13 22:28:54 +02:00
(let ((port (eval (read-from-string "(swank:create-server :dont-close t)"))))
(cl-repl:message-from-magic "Started SWANK server on port ~A" port)))
2023-05-13 18:51:31 +02:00
;; Remove bullshit commands
(delete-if
(lambda (cmd)
(let ((name (car cmd)))
(or (string= name "%python")
(string= name "%perl"))))
*magic-commands*)