anchor.diff:          #'string<
           :key #'mode-identifier-name))
   
  -(defun major-modes ()
  -  (mapcar #'mode-identifier-name (collect-modes #'major-mode-p)))
  -
  -(defun minor-modes ()
  -  (mapcar #'mode-identifier-name (collect-modes #'minor-mode-p)))
  +(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)))
  +
  +(defclass global-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))
   
   (defmethod mode-name ((mode symbol))
     (assert (not (null mode)))
  
positive.code:           :disable-hook ,disable-hook))
         (register-mode ',minor-mode (make-instance ',minor-mode)))))
  
  (defun change-buffer-mode (buffer mode &rest args)
    (save-excursion
      (setf (current-buffer) buffer)
      (apply mode args))
    buffer)
  
  (defvar *current-global-mode* nil)
  
  (defclass global-mode (mode)
    ((enable-hook :initarg :enable-hook :reader mode-enable-hook)
     (disable-hook :initarg :disable-hook :reader mode-disable-hook)))
  
  (defun current-global-mode ()
    *current-global-mode*)
  
negative.code: 
  (defvar *global-minor-mode-list* '())
  (defvar *mode-objects* '())
  
  (defun get-mode-object (mode-name)
    (get mode-name 'mode-object))
  