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

From: Dmitry Gutov <[email-masked]>
Date: Fri, 31 Jan 2020 02:31:18 +0300

On 31.01.2020 1:50, Juri Linkov wrote:
> Maybe safer would be to use just (delay-mode-hooks (set-auto-mode))

That would be my choice as well.

BTW, xref--collect-matches uses buffer-file-name in a similar way, 
curious how a problem with Eglot (or etc) never came up.

Also, see the comment there why it couldn't use delay-mode-hooks at the 
time (maybe it can now, if we're okay with entirely unsupporting 
syntax-propertize-via-font-lock).