anchor.diff:  (in-package :lem-lisp-mode)
   
   (defparameter *default-port* 4005)
  -
  -;; (1)とコメントで印を付けているところはコネクションを複数管理するときに今のやり方ではまずいところ
   
   (defvar *connection* nil)
   (defvar *write-string-function* 'write-string-to-output-buffer)
  
positive.code: (defun repl-read-string (thread tag)
    (let ((buffer (repl-buffer)))
      (when buffer
        (push thread *read-string-thread-stack*)
        (push tag *read-string-tag-stack*)
        (let ((windows (get-buffer-windows buffer)))
          (setf (current-window)
                (if windows
  
negative.code:   (repl-reset-input)
    (lem.listener-mode:listener-mode t))
  
  (defun read-string-thread-stack ()
    (buffer-value (current-buffer) 'read-string-thread-stack))
  
  (defun (setf read-string-thread-stack) (val)
    (setf (buffer-value (current-buffer) 'read-string-thread-stack) val))
  
  (defun read-string-tag-stack ()
    (buffer-value (current-buffer) 'read-string-tag-stack))
  
  (defun (setf read-string-tag-stack) (val)
    (setf (buffer-value (current-buffer) 'read-string-tag-stack) val))
  
  (define-key *lisp-repl-mode-keymap* "C-c C-c" 'lisp-repl-interrupt)
  
  (define-command lisp-repl-interrupt () ()
    (swank-protocol:send-message-string *connection*
                                        (format nil "(:emacs-interrupt ~(~S~))"
                                                (or (car (read-string-thread-stack))
                                                    :repl-thread))))
  
  (defun repl-buffer (&optional force)
  