anchor.diff:  (in-package :lem)
   
  -(defparameter *frame-count* 0)
  -(defparameter *frame-list* '())  ;; TODO: change to defvar when ends testing
   (defparameter *frame-display-map* (make-hash-table))
   
   (defstruct frame
  -  id
     ;; window
     current-window
     (window-tree nil)
  
positive.code:     (remhash key)
      frame))
  
  (defun register-frame (frame)
    (let ((id *frame-count*))
      (setf (frame-id frame) id)
      (incf *frame-count*)
      id))
  
  (defun setup-frame (frame)
    (register-frame frame)
    (add-frame frame)
    (setup-minibuffer frame)
    (setup-windows frame))
  
  (defun teardown-frame (frame)
    (teardown-windows frame)
    ;; (teardown-minibuffer frame) ; minibufferをfloating-windowとして扱うので開放処理はしない
    (remove-frame (frame-id frame)))
  
  (defun teardown-frames ()
    (mapc #'teardown-frame *frame-list*))
  
  (defun redraw-frame (frame)
    (redraw-display* frame))
  
negative.code:   (minibuf-window nil)
    (minibuffer-calls-window nil)
    (minibuffer-start-charpos nil))
  
  (defun map-frame (key frame)
    (setf (gethash key *frame-display-map*) frame))
  