dotfiles/.replrc
2023-06-02 17:04:19 +02:00

23 lines
577 B
Plaintext

;;; 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
(eval "(swank:create-server :dont-close t)"))
;; Remove bullshit commands
(delete-if
(lambda (cmd)
(let ((name (car cmd)))
(or (string= name "%python")
(string= name "%perl"))))
*magic-commands*)