Subject: bug#48990: 28.0.50; buffer-local and threads malarkey

From: Stefan Monnier <[email-masked]>
Date: Tue, 28 Sep 2021 23:28:47 -0400

> # buffer-local causes let-bound variable to freak out
> src/emacs -Q --batch --eval "(setq confuse-thread t)" -l ./usurped.el

I get:

    failed in thread#1, var is local-4
    failed in thread#2, var is local-4
    failed in thread#3, var is local-4
    failed in thread#0, var is local-4
    succeeded in thread#4, var is let

which indeed is quite wrong, since the thread let-binds `doomsday` to
"let" and then doesn't mutate it anywhere.

Sounds like a bug in the context switch code.

        Stefan