anchor.diff:  (defmacro %listener-point (buffer)
     `(buffer-value ,buffer %listener-point-indicator))
   
  -(defun %listener-history ()
  -  (let ((listener (variable-value 'listener-store :buffer (current-buffer))))
  -    (listener-history listener)))
  -
   (define-editor-variable listener-set-prompt-function)
   (define-editor-variable listener-check-input-function)
   (define-editor-variable listener-execute-function)
  
positive.code: (define-key *listener-mode-keymap* "M-r" 'listener-previous-matching-input)
  (define-key *listener-mode-keymap* "C-c M-o" 'listener-clear-buffer)
  (define-key *listener-mode-keymap* "C-c C-u" 'listener-clear-input)
  
  (defun listener-start-point (buffer)
    (%listener-point buffer))
  
negative.code:     (buffer-end (current-point))))
  
  (define-command listener-prev-input () ()
    (%backup-edit-string (current-listener-history))
    (multiple-value-bind (str win)
        (lem.history:prev-history (current-listener-history))
      (when win
        (replace-textarea str))))
  
  (define-command listener-next-input () ()
    (%backup-edit-string (current-listener-history))
    (%restore-edit-string (current-listener-history))
    (multiple-value-bind (str win)
        (lem.history:next-history (current-listener-history))
      (when win
        (replace-textarea str))))
  
  (define-command listener-previous-matching-input (regexp)
      ((prompt-for-string "Previous element matching (regexp): "))
    (%backup-edit-string (current-listener-history))
    (multiple-value-bind (str win)
        (lem.history:previous-matching (current-listener-history) regexp)
      (when win
        (replace-textarea str))))
  
  