anchor.diff:  
   It's similar to the \"private window\" in popular browser, but the scope here is
   the buffer (which gives us more flexibility)."))
  +
  +(defmethod print-object ((buffer buffer) stream)
  +  (print-unreadable-object (buffer stream :type t :identity t)
  +    (format stream "~a" (id buffer))))
  +
  +(defvar %default-modes '(base-mode)
  +  "The default modes for unspecialized buffers.
  +This is useful when there is no current buffer.")
  +
  +(export-always 'default-modes)
  +(defgeneric default-modes (buffer)
  +  (:method-combination append)
  +  (:method append ((buffer buffer))
  +    '())
  +  (:method append ((buffer context-buffer))
  +    (append
  +     (list
  +      ;; TODO: No need for `resolve-symbol' if we move `context-buffer'
  +      ;; declaration in a separate file, loaded after modes.
  +      (resolve-symbol :annotate-mode :mode)
  +      (resolve-symbol :history-mode :mode)
  +      (resolve-symbol :password-mode :mode))
  +     %default-modes))
  +  (:method append ((buffer document-buffer))
  +    (append
  +     (list
  +      ;; TODO: No need for `resolve-symbol' if we move `document-buffer'
  +      ;; declaration in a separate file, loaded after modes.
  +      (resolve-symbol :element-hint-mode :mode)
  +      (resolve-symbol :search-buffer-mode :mode)
  +      (resolve-symbol :autofill-mode :mode) ; TODO: Remove from default?
  +      (resolve-symbol :spell-check-mode :mode))
  +     %default-modes))
  +  (:documentation "The symbols of the modes to instantiate on buffer creation.
  +The mode instances are stored in the `modes' BUFFER slot.
  +
  +The default modes returned by this method are appended to the default modes
  +inherited from the superclasses."))
  +
  +(defmethod default-modes :around ((buffer buffer))
  +  "Remove the duplicates from the `default-modes'."
  +  (remove-duplicates (call-next-method)
  +                     ;; Mode at the beginning of the list have higher priorities.
  +                     :from-end t))
   
   (define-class network-buffer (buffer)
     ((status
  
positive.code:   (:accessor-name-transformer (class*:make-name-transformer name))
    (:metaclass user-class)
    (:documentation "A buffer which behaviour can be modified with `mode's."))
  
  (defmethod modes ((buffer buffer))
    "Non-modable buffers never have modes.
  
negative.code:   (:documentation "Buffers in which hold structured documents.
  The user can scroll them, zoom, etc."))
  
  (define-class context-buffer (buffer)
    ((last-access
      (local-time:now)
  