Subject: Re: bug#67145: Modes in vc-deduce-backend

From: Juri Linkov <[email-masked]>
Date: Mon, 13 Nov 2023 19:29:00 +0200

>> Here is a patch that avoids hard-coding the modes in vc-deduce-backend.
>> For example, it makes possible to replace shell-mode with comint-mode, etc.
>
> Look good, although it would be great to find a more meaningful name:
> what kind of modes exactly should be in that list. Non-file-visiting?

These modes are non-file-visiting as well:

   (cond ((derived-mode-p 'vc-dir-mode)   vc-dir-backend)
         ((derived-mode-p 'log-view-mode) log-view-vc-backend)
         ((derived-mode-p 'log-edit-mode) log-edit-vc-backend)
         ((derived-mode-p 'diff-mode)     diff-vc-backend)

What distinguishes these modes is that they are non-vc modes:

  '(dired-mode shell-mode eshell-mode compilation-mode)

Then maybe

  (defvar vc-deduce-backend-nonvc-modes