anchor.diff:                           (let ((new-table (make-hash-table :test 'equal)))
                              (setf (gethash k table) new-table)
                              (setf table new-table))))))))
  +
  +(defun parse-key (string)
  +  (labels ((f (string)
  +             (if (and (>= (length string) 2)
  +                      (eql (aref string 0) #\M)
  +                      (eql (aref string 1) #\-))
  +                 (cons (keyname->keychar "escape") (f (subseq string 2)))
  +                 (list (keyname->keychar string)))))
  +    (mapcan #'(lambda (string)
  +                (if (and (< 4 (length string))
  +                         (string= string "C-M-" :end1 4))
  +                    (f (concatenate 'string
  +                                    "M-C-" (subseq string 4)))
  +                    (f string)))
  +            (uiop:split-string string :separator " "))))
   
   (defun kbd-to-string (key)
     (format nil "~{~A~^~}"
  
positive.code:       (get-command cmd))))
  
  (defun abort-key-p (key)
    (eq 'keyboard-quit (lookup-keybind key)))
  
negative.code: (defun kbd-p (x)
    (typep x 'kbd))
  
  (defun define-key (keymap keyspec symbol)
    (check-type symbol symbol)
    (let ((keys (typecase keyspec
                  (symbol (loop :for (key1 . keymap1) :in (get keyspec 'keybind)
                                :do (define-key keymap key1 symbol))
                          (return-from define-key))
                  (list keyspec)
                  (string (parse-key keyspec)))))
      (unless (and (listp keys)
                   (every #'characterp keys))
        (error "define-key: ~s is illegal key" keyspec))
      (pushnew (cons keyspec keymap) (get symbol 'keybind) :test 'equal)
      (define-key-internal keymap keys symbol)))
  
  (defun define-key-internal (keymap keys symbol)
    (loop :with table := (keymap-table keymap)
          :for rest :on keys
          :for k := (car rest)
          :do (cond ((null (cdr rest))
                     (setf (gethash k table) symbol))
  