anchor.diff:  
   (defvar *global-minor-mode-list* '())
   (defvar *mode-objects* '())
  -
  -(defclass mode ()
  -  ((name :initarg :name :reader mode-name)
  -   (description :initarg :description :reader mode-description)
  -   (keymap :initarg :keymap :reader mode-keymap :writer set-mode-keymap)))
  -
  -(defclass major-mode (mode)
  -  ((syntax-table :initarg :syntax-table :reader mode-syntax-table)
  -   (hook-variable :initarg :hook-variable :reader mode-hook-variable)))
  -
  -(defclass minor-mode (mode)
  -  ((enable-hook :initarg :enable-hook :reader mode-enable-hook)
  -   (disable-hook :initarg :disable-hook :reader mode-disable-hook)))
  -
  -(defmethod mode-identifier-name ((mode mode))
  -  (type-of mode))
  -
  -(defun major-mode-p (mode)
  -  (typep mode 'major-mode))
  -
  -(defun minor-mode-p (mode)
  -  (typep mode 'minor-mode))
   
   (defun get-mode-object (mode-name)
     (get mode-name 'mode-object))
  
positive.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))
  
  (defun mode-active-p (buffer mode)
    (or (eq mode (buffer-major-mode buffer))
  
negative.code:           :hook-variable ',mode-hook))
         (register-mode ',major-mode (make-instance ',major-mode)))))
  
  (defun global-minor-mode-p (mode)
    (get mode 'global-minor-mode-p))
  
  (defun enable-minor-mode (minor-mode)
    (if (global-minor-mode-p minor-mode)
        (pushnew minor-mode *global-minor-mode-list*)
        (pushnew minor-mode (buffer-minor-modes (current-buffer))))
    (when (mode-enable-hook minor-mode)
      (funcall (mode-enable-hook minor-mode))))
  
  (defun disable-minor-mode (minor-mode)
    (if (global-minor-mode-p minor-mode)
        (setf *global-minor-mode-list*
              (delete minor-mode *global-minor-mode-list*))
        (setf (buffer-minor-modes (current-buffer))
              (delete minor-mode (buffer-minor-modes (current-buffer)))))
    (when (mode-disable-hook minor-mode)
      (funcall (mode-disable-hook minor-mode))))
  
  (defun toggle-minor-mode (minor-mode)
    (if (mode-active-p (current-buffer) minor-mode)
        (disable-minor-mode minor-mode)
        (enable-minor-mode minor-mode)))
  
  (defmacro define-minor-mode (minor-mode
                               (&key name description (keymap nil keymapp) global enable-hook disable-hook)
                               &body body)
  