Subject: bug#21657: 25.0.50; Python mode goes into an infinite loop

From: immerrr again <[email-masked]>
Date: Tue, 13 Oct 2015 08:42:07 +0300

On Tue, Oct 13, 2015 at 8:05 AM, Daniel Colascione <[email-masked]> wrote:
> I saw your message after I sent mine. How exactly is it supposed to
> work? I can't reliably repro the condition that leads to the variable
> being inherited across buffers (even with Torsten Bronger's testcase),
> so I can't test it. It doesn't seem like adding a DEFSYM should make a
> difference here though. Can you explain why your patch works?
>

Apparently, I was testing a version that was older than [1] since it
was reproduced reliably. With it, the variable indeed seems properly
buffer-local. I think I misread commit metadata in git blame thinking
that the commit was from the last year, so I presumed that my Emacs
version already had it. I couldn't find any docs about obarray
initialization procedure (DEFSYM code-generation and alike), that was
the only place where Fmake_variable_buffer_local was invoked on
intern("foo") instead of a DEFSYM-initialized variable and I didn't
have much time to deduce from sources how these two approaches differ,
so I simply changed it to look like the others and ensured that it
worked after the change. Feel free to ignore that patch if it is
unnecessary.

1. https://github.com/emacs-mirror/emacs/commit/0360b7f2c4f0358106e229de4dfe91a67445a50c