Klimi's new dotfiles with stow.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

51 wiersze
1.7 KiB

4 lat temu
  1. (require 'slime)
  2. (require 'cl-lib)
  3. ;;; bits of the following taken from slime-asdf.el
  4. (define-slime-contrib slime-quicklisp
  5. "Quicklisp support."
  6. (:authors "Matthew Kennedy <burnsidemk@gmail.com>")
  7. (:license "GPL")
  8. (:slime-dependencies slime-repl)
  9. (:swank-dependencies swank-quicklisp))
  10. ;;; Utilities
  11. (defgroup slime-quicklisp nil
  12. "Quicklisp support for Slime."
  13. :prefix "slime-quicklisp-"
  14. :group 'slime)
  15. (defvar slime-quicklisp-system-history nil
  16. "History list for Quicklisp system names.")
  17. (defun slime-read-quicklisp-system-name (&optional prompt default-value)
  18. "Read a Quick system name from the minibuffer, prompting with PROMPT."
  19. (let* ((completion-ignore-case nil)
  20. (prompt (or prompt "Quicklisp system"))
  21. (quicklisp-system-names (slime-eval `(swank:list-quicklisp-systems)))
  22. (prompt (concat prompt (if default-value
  23. (format " (default `%s'): " default-value)
  24. ": "))))
  25. (completing-read prompt (slime-bogus-completion-alist quicklisp-system-names)
  26. nil nil nil
  27. 'slime-quicklisp-system-history default-value)))
  28. (defun slime-quicklisp-quickload (system)
  29. "Load a Quicklisp system."
  30. (slime-save-some-lisp-buffers)
  31. (slime-display-output-buffer)
  32. (slime-repl-shortcut-eval-async `(ql:quickload ,system)))
  33. ;;; REPL shortcuts
  34. (defslime-repl-shortcut slime-repl-quicklisp-quickload ("quicklisp-quickload" "ql")
  35. (:handler (lambda ()
  36. (interactive)
  37. (slime-quicklisp-quickload (slime-read-quicklisp-system-name))))
  38. (:one-liner "Load a system known to Quicklisp."))
  39. (provide 'slime-quicklisp)