Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
marvel
GitHub Repository: marvel/qnf
Path: blob/master/elisp/slime/contrib/slime-banner.el
990 views
1
2
(define-slime-contrib slime-banner
3
"Persistent header line and startup animation."
4
(:authors "Helmut Eller <[email protected]>"
5
"Luke Gorrie <[email protected]>")
6
(:license "GPL")
7
(:on-load (setq slime-repl-banner-function 'slime-startup-message))
8
(:on-unload (setq slime-repl-banner-function 'slime-repl-insert-banner)))
9
10
(defcustom slime-startup-animation (fboundp 'animate-string)
11
"Enable the startup animation."
12
:type '(choice (const :tag "Enable" t) (const :tag "Disable" nil))
13
:group 'slime-ui)
14
15
(defcustom slime-header-line-p (boundp 'header-line-format)
16
"If non-nil, display a header line in Slime buffers."
17
:type 'boolean
18
:group 'slime-repl)
19
20
(defun slime-startup-message ()
21
(when slime-header-line-p
22
(setq header-line-format
23
(format "%s Port: %s Pid: %s"
24
(slime-lisp-implementation-type)
25
(slime-connection-port (slime-connection))
26
(slime-pid))))
27
(when (zerop (buffer-size))
28
(let ((welcome (concat "; SLIME " (or (slime-changelog-date)
29
"- ChangeLog file not found"))))
30
(if slime-startup-animation
31
(animate-string welcome 0 0)
32
(insert welcome)))))
33
34
(provide 'slime-banner)
35
36