anchor.diff:      (change-global-mode-keymap 'vi-mode (vi-state-keymap state))
       (change-element-name (format nil "[~A]" name))
       (when (vi-state-enable-hook state)
  -      (apply (vi-state-enable-hook state) args))))
  +      (apply (vi-state-enable-hook state) args))
  +    (unless *default-cursor-color*
  +      (setf *default-cursor-color*
  +            (attribute-background (ensure-attribute 'cursor nil))))
  +    (set-attribute 'cursor :background (or (vi-state-cursor-color state) *default-cursor-color*))))
   
   (defmacro with-state (state &body body)
     (alexandria:with-gensyms (old-state)
  
positive.code:   keymap
    post-command-hook
    enable-hook
    disable-hook)
  
  (defvar *current-state* nil)
  
  (defmacro define-vi-state (name (&key keymap post-command-hook) &body spec)
    (let ((enable-form (rest (assoc :enable spec)))
          (disable-form (rest (assoc :disable spec))))
      `(setf (get ',name 'state)
  
negative.code:                           :keymap ,keymap
                            :post-command-hook ,post-command-hook
                            :enable-hook ,(if enable-form `(lambda ,@enable-form))
                            :disable-hook ,(if disable-form `(lambda ,@disable-form))
                            :cursor-color ,cursor-color))))
  
  (defun current-state ()
    *current-state*)
  