bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Monnier
Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)
Date: Fri, 24 Jan 2020 09:18:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> Yes, it's definitely borderline.  I remember feeling a bit uneasy about
>> it at the time.  Maybe a better fix would be to be able to pass the
>> file-name to `set-auto-mode` (or some new function created for that
>> purpose) as an argument (instead of passing it via dynamic scoping in
>> `buffer-file-name`).
>
> The problem is that the right value of buffer-file-name is required
> also by other more deep functions that set local variables like
> dir-locals-collect-variables.

Passing it down as an arg is indeed problematic.
Maybe we should just add yet-another buffer-<foo>-filename and change
the corresponding places to so that instead of consulting

    buffer-file-name

they consult

    (or buffer-file-name buffer-<foo>-filename)

Maybe this could also be used for things like `vc-revision-other-window`.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]