Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)

From: Juri Linkov <[email-masked]>
Date: Wed, 05 Feb 2020 01:20:44 +0200

>> vc-find-revision-no-save should not use delay-mode-hooks when called as
>> a command.
>
> That's the problem with the current approach: we end up making decisions
> which can't be justified.  Whether mode hooks should be run or not
> depends on the hook and various other things.  What we *do* know, OTOH
> is that `vc-find-revision-no-save`s buffer is not associated with
> a file, so setting `buffer-file-name` can result in bugs.

delay-mode-hooks was intended as the safest workaround to install in emacs-27.

Using alternatives of buffer-file-name are not straightforward
and need more testing in emacs-28.