anchor.diff:      (setf (%listener-history)
             (lem.history:make-history))))
   
  -(defun listener-start-point ()
  -  (%listener-point))
  +(defun listener-start-point (buffer)
  +  (%listener-point buffer))
   
   (defun listener-start (buffer-name mode)
     (let ((buffer (get-buffer-create buffer-name)))
  
positive.code: (defvar *prompt-attribute* (make-attribute "blue" nil :bold-p t))
  
  (defvar %listener-point-indicator (gensym))
  (defmacro %listener-point ()
    `(get-bvar %listener-point-indicator))
  
  (defvar %listener-history-indicator (gensym))
  (defmacro %listener-history ()
  
negative.code: (define-command listener-prev-input () ()
    (multiple-value-bind (str win)
        (lem.history:prev-history (%listener-history))
      (let ((start (listener-start-point (current-buffer)))
            (end (buffers-end (current-buffer))))
        (save-excursion
          (delete-between-points start end)
          (when win (insert-string start str))
          (move-point (%listener-point (current-buffer)) start)))))
  
  (define-key *listener-mode-keymap* (kbd "M-n") 'listener-next-input)
  (define-command listener-next-input () ()
    (multiple-value-bind (str win)
        (lem.history:next-history (%listener-history))
      (let ((start (listener-start-point (current-buffer)))
            (end (buffers-end (current-buffer))))
        (save-excursion
          (delete-between-points start end)
          (when win (insert-string start str))
          (move-point (%listener-point (current-buffer)) start)))))
  
  (define-key *listener-mode-keymap* (kbd "M-r") 'listener-reset-interactive)
  (define-command listener-reset-interactive (arg) ("P")
  