anchor.diff:  (in-package :lem)
   
  -(defvar *mode-list* '())
   (defvar *global-minor-mode-list* '())
  -
  -(defun register-mode (name object)
  -  (setf (get name 'mode-object) object))
  -
  -(defun get-mode-object (mode-name)
  -  (get mode-name 'mode-object))
  +(defvar *mode-objects* '())
   
   (defclass mode ()
     ((name :initarg :name :reader mode-name)
  
positive.code:                              &body body)
    (let ((command-class-name (make-symbol (string major-mode))))
      `(progn
         (pushnew ',major-mode *mode-list*)
         ,@(when mode-hook
             `((defvar ,mode-hook '())))
         ,@(when keymap
  
negative.code: (defmethod mode-hook-variable ((mode symbol))
    (assert (not (null mode)))
    (mode-hook-variable (get-mode-object mode)))
  
  (defun global-minor-mode-p (mode)
    (get mode 'global-minor-mode-p))
  