[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: |
Tue, 28 Jan 2020 15:12:03 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> So this is because those modes
They're not "modes", really, they're features that create a temp buffer
related to file FOO and need to set this buffer to the same mode as file FOO
(e.g. this happens in vc-revision-other-window, or also in diff-mode
where we grab a hunk's text and want to put it in its corresponding
major mode to give it mode-specific highlighting).
> set buffer-file-name instead of activating the major mode directly?
Right: they don't know which major mode should be used, so they set
buffer-file-name and then call set-auto-mode (which looks up
auto-mode-alist and directory local vars appropriately).
> And by setting buffer-file-name they by side effect tell unrelated
> features that this buffer is associated with a file?
Indeed.
> If so, then I'm not sure I understand the solution. The offending
> modes will have to be modified to use this new variable instead of
> buffer-file-name, no?
That's what the patch does, yes (modulo the fact that they're not
really "modes").
> And if we have to modify them, then why not do TRT while at that,
> i.e. call the major mode directly instead of setting some variable?
We set the variable in order to find out what mode to use.
Stefan
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), (continued)
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/20
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Juri Linkov, 2020/01/23
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/24
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Juri Linkov, 2020/01/27
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/27
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Eli Zaretskii, 2020/01/27
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/28
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Dmitry Gutov, 2020/01/28
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Juri Linkov, 2020/01/28
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Eli Zaretskii, 2020/01/28
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props),
Stefan Monnier <=
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Eli Zaretskii, 2020/01/28
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/28
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Eli Zaretskii, 2020/01/29
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/29
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Eli Zaretskii, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Juri Linkov, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Dmitry Gutov, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Felician Nemeth, 2020/01/26