anchor.diff:           (enable-matching-modes (url request-data) (buffer request-data))))))
     request-data)
   
  +(declaim (ftype (function (root-mode auto-mode boolean) list)
  +                mode-covered-by-auto-mode-p))
   (defun mode-covered-by-auto-mode-p (mode auto-mode enable-p)
  -  (or (member mode (non-rememberable-modes auto-mode) :test #'mode-equal)
  -      (let ((matching-rule (matching-auto-mode-rule
  -                            (url (buffer auto-mode))
  -                            (buffer auto-mode))))
  -        (member mode (or (and matching-rule (union (included matching-rule)
  -                                                   (excluded matching-rule)))
  -                         ;; Mode is covered by auto-mode only if it is
  -                         ;; in last-active-modes and gets enabled.
  -                         ;; If it gets disabled, user should be prompted,
  -                         ;; because they may want to persist it.
  -                         (and enable-p (last-active-modes auto-mode)))
  -                :test #'mode-equal))))
  +  (let ((invocation (mode-invocation mode)))
  +    (or (member invocation (non-rememberable-modes auto-mode)
  +                :test #'equals)
  +        (let ((matching-rule (matching-auto-mode-rule
  +                              (url (buffer auto-mode))
  +                              (buffer auto-mode))))
  +          (member invocation (or (and matching-rule (union (included matching-rule)
  +                                                           (excluded matching-rule)))
  +                                 ;; Mode is covered by auto-mode only if it is
  +                                 ;; in last-active-modes and gets enabled.
  +                                 ;; If it gets disabled, user should be prompted,
  +                                 ;; because they may want to persist it.
  +                                 (and enable-p (last-active-modes auto-mode)))
  +                  :test #'equals)))))
   
   (declaim (ftype (function (string) list) url-infer-match))
   (defun url-infer-match (url)
  
positive.code:       (setf url (url url)))
      (add-modes-to-auto-mode-rules
       (url-infer-match url)
       :include (set-difference (modes (current-buffer))
                                (default-modes (current-buffer))
                                :test #'mode-equal)
       :exclude (set-difference (default-modes (current-buffer))
                                (modes (current-buffer))
                                :test #'mode-equal))))
  
  (define-command save-exact-modes-for-future-visits ()
    "Store the exact list of enabled modes to auto-mode rules for all the future visits of this
  
negative.code: (defun enable-matching-modes (url buffer)
    (let ((rule (matching-auto-mode-rule url buffer))
          (auto-mode (find-mode buffer 'auto-mode)))
      (dolist (mode-invocation (set-difference
                                 (included rule)
                                 (rememberable-of (modes buffer) auto-mode)
                                 :test #'equals))
        (check-type mode-invocation mode-invocation)
        (enable-modes (list (name mode-invocation)) buffer (arguments mode-invocation)))
      (disable-modes (mapcar #'name
                             (if (exact-p rule)
                                 (set-difference
                                  (rememberable-of (modes buffer) auto-mode)
                                  (included rule) :test #'equals)
                                 (excluded rule)))
                     buffer)))
  
  (defun can-save-last-active-modes (auto-mode url)
  