mirror of
https://github.com/amix/vimrc
synced 2025-07-12 14:15:00 +08:00
Add support for Scheme and Racket language.
This commit is contained in:
@ -0,0 +1,39 @@
|
||||
;;; swank-buffer-streams.lisp --- Streams that output to a buffer
|
||||
;;;
|
||||
;;; Authors: Ed Langley <el-github@elangley.org>
|
||||
;;;
|
||||
;;; License: This code has been placed in the Public Domain. All warranties
|
||||
;;; are disclaimed.
|
||||
|
||||
(in-package :swank)
|
||||
|
||||
(defpackage :swank-buffer-streams
|
||||
(:use :cl)
|
||||
(:import-from :swank
|
||||
defslimefun
|
||||
add-hook
|
||||
encode-message
|
||||
send-event
|
||||
find-thread
|
||||
dcase
|
||||
current-socket-io
|
||||
send-to-emacs
|
||||
current-thread-id
|
||||
wait-for-event
|
||||
|
||||
*emacs-connection*
|
||||
*event-hook*)
|
||||
(:export make-buffer-output-stream))
|
||||
|
||||
(in-package :swank-buffer-streams)
|
||||
|
||||
(defun get-temporary-identifier ()
|
||||
(intern (symbol-name (gensym "BUFFER"))
|
||||
:keyword))
|
||||
|
||||
(defun make-buffer-output-stream (&optional (target-identifier (get-temporary-identifier)))
|
||||
(swank:ed-rpc '#:slime-make-buffer-stream-target (current-thread-id) target-identifier)
|
||||
(values (swank:make-output-stream-for-target *emacs-connection* target-identifier)
|
||||
target-identifier))
|
||||
|
||||
(provide :swank-buffer-streams)
|
Reference in New Issue
Block a user