Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
marvel
GitHub Repository: marvel/qnf
Path: blob/master/elisp/slime/contrib/slime-motd.el
990 views
1
;;; slime-motd.el ---
2
;;
3
;; Authors:
4
;;
5
;; License: GNU GPL (same license as Emacs)
6
;;
7
;;; Installation
8
;;
9
;; Add slime-motd to your slime-setup call.
10
11
(define-slime-contrib slime-motd
12
"Message Of The Day in a slime repl"
13
(:authors "Marco Baringer <[email protected]>")
14
(:license "GPL")
15
(:slime-dependencies slime-banner)
16
(:swank-dependencies swank-motd)
17
(:on-load
18
(add-hook 'slime-connected-hook 'slime-insert-motd)))
19
20
(defcustom slime-motd-pathname nil
21
"The local pathname the motd is read from."
22
:group 'slime-mode
23
:type '(file :must-match t))
24
25
(defun slime-insert-motd ()
26
(slime-eval-async `(swank::read-motd ,slime-motd-pathname)
27
(lambda (motd)
28
(when motd
29
(slime-repl-insert-result (list :values motd))))))
30
31
(provide 'slime-motd)
32
33