anchor.diff:        (format out "~s~%"
                 (queue:queue-to-list *input-history*))
         (uiop/image:print-backtrace :stream out :count 100))))
  -
  -(defun lem-save-error (&rest args)
  -  (lem-init args)
  -  (unwind-protect (progn
  -                    #+sbcl (handler-bind
  -                               ((sb-sys:interactive-interrupt #'dump-error)
  -                                (error #'dump-error))
  -                             (lem-main))
  -                    #-sbcl (lem-main))
  -    (lem-finallize)))
  
positive.code: (defun lem-finallize ()
    (cl-charms/low-level:endwin))
  
  (defun lem-mainloop-thread ()
    (handler-bind ((error #'dump-error))
      (do ((*curr-flags* (make-flags) (make-flags))
           (*last-flags* (make-flags) *curr-flags*))
          (*exit*)
        (window-maybe-update)
        (case (catch 'abort
                (main-step)
                nil)
          (readonly
           (minibuf-print "Read Only"))
          (abort
           (keyboard-quit))))))
  
  (defun lem-input-key-thread ()
    (loop :for c := (cl-charms/low-level:getch) :do
  
negative.code:     (when *exit*
        (return))))
  
  (defun lem-main (&optional debug-p)
    (setq *exit* nil)
    (let (mainloop-thread
          input-key-thread)
      (setq mainloop-thread
            (bt:make-thread #'(lambda ()
                                (lem-mainloop-thread debug-p))))
      (setq input-key-thread (bt:make-thread #'lem-input-key-thread))
      (bt:join-thread mainloop-thread)
      (bt:destroy-thread input-key-thread)))
  
  (defun lem-internal (args debug-p)
    (unwind-protect
      (progn
        (lem-init args)
        (lem-main debug-p))
      (lem-finallize)))
  
  (defun lem (&rest args)
    (lem-internal args nil))
  
  (defun lem-save-error (&rest args)
    (lem-internal args t))
  
  (defun dump-error (condition)
    (with-open-file (out *lem-error-file*
  