Klimi's new dotfiles with stow.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

39 строки
1.2 KiB

5 лет назад
  1. ;;; swank-buffer-streams.lisp --- Streams that output to a buffer
  2. ;;;
  3. ;;; Authors: Ed Langley <el-github@elangley.org>
  4. ;;;
  5. ;;; License: This code has been placed in the Public Domain. All warranties
  6. ;;; are disclaimed.
  7. (in-package :swank)
  8. (defpackage :swank-buffer-streams
  9. (:use :cl)
  10. (:import-from :swank
  11. defslimefun
  12. add-hook
  13. encode-message
  14. send-event
  15. find-thread
  16. dcase
  17. current-socket-io
  18. send-to-emacs
  19. current-thread-id
  20. wait-for-event
  21. *emacs-connection*
  22. *event-hook*)
  23. (:export make-buffer-output-stream))
  24. (in-package :swank-buffer-streams)
  25. (defun get-temporary-identifier ()
  26. (intern (symbol-name (gensym "BUFFER"))
  27. :keyword))
  28. (defun make-buffer-output-stream (&optional (target-identifier (get-temporary-identifier)))
  29. (swank:ed-rpc '#:slime-make-buffer-stream-target (current-thread-id) target-identifier)
  30. (values (swank:make-output-stream-for-target *emacs-connection* target-identifier)
  31. target-identifier))
  32. (provide :swank-buffer-streams)