anchor.diff:  The pre-defined `:after' method handles further cleanup."))
   
   (defmethod disable :after ((mode mode) &key)
  +  (setf (slot-value mode 'enabled-p) nil)
     (hooks:run-hook (disable-hook mode) mode)
     (let ((buffer (buffer mode)))
       (hooks:run-hook (disable-mode-hook (buffer mode)) mode)
  
positive.code: The pre-defined `:after' method handles further setup."))
  
  (defmethod enable :after ((mode mode) &key)
    (hooks:run-hook (enable-hook mode) mode)
    (let ((buffer (buffer mode)))
      (hooks:run-hook (enable-mode-hook buffer) mode)
      (if (and (prompt-buffer-p buffer)
               (eq (first (active-prompt-buffers (window buffer)))
                   buffer))
          (prompt-render-prompt buffer)
          (print-status))
      ;; TODO: Should we move mode to the front when it already exists?
      (pushnew mode (modes (buffer mode))))
    (setf (slot-value mode 'enabled-p) t)
    (log:debug "~a enabled." mode))
  
  (export-always 'disable)
  
negative.code:                  buffer))
          (prompt-render-prompt buffer)
          (print-status)))
    (log:debug "~a disabled." mode))
  
  (export-always 'define-mode)
  