Klimi's new dotfiles with stow.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

  1. (require 'slime)
  2. (require 'slime-repl)
  3. (define-slime-contrib slime-banner
  4. "Persistent header line and startup animation."
  5. (:authors "Helmut Eller <heller@common-lisp.net>"
  6. "Luke Gorrie <luke@synap.se>")
  7. (:license "GPL")
  8. (:on-load (setq slime-repl-banner-function 'slime-startup-message))
  9. (:on-unload (setq slime-repl-banner-function 'slime-repl-insert-banner)))
  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. (defcustom slime-header-line-p (boundp 'header-line-format)
  15. "If non-nil, display a header line in Slime buffers."
  16. :type 'boolean
  17. :group 'slime-repl)
  18. (defun slime-startup-message ()
  19. (when slime-header-line-p
  20. (setq header-line-format
  21. (format "%s Port: %s Pid: %s"
  22. (slime-lisp-implementation-type)
  23. (slime-connection-port (slime-connection))
  24. (slime-pid))))
  25. (when (zerop (buffer-size))
  26. (let ((welcome (concat "; SLIME " slime-version)))
  27. (if slime-startup-animation
  28. (animate-string welcome 0 0)
  29. (insert welcome)))))
  30. (provide 'slime-banner)