Subject: bug#40975: 28.0.50; Variable gets buffer-local unexpectedly

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 22 Oct 2020 16:27:42 +0200

Michael Heerdegen <[email-masked]> writes:

> Hello,
>
> here is a reproducer:
>
> #+begin_src emacs-lisp
> (defun test ()
>   (make-local-variable 'my-test-var)
>   (with-current-buffer (get-buffer-create "Testbuffer")
>     (setq my-test-var 27)))
> #+end_src
>
> If you eval M-: (test) e.g. in emacs -Q and inspect the binding of
> `my-test-var' in "Testbuffer" and the other buffers, you'll see that the
> variable has become buffer local in "Testbuffer" though it has never
> been made local there.  This is the bug.

I'm seeing the opposite -- my-test-var is local to whatever buffer I
said M-: (test) in (but is unbound there), and is bound and has the
value 27 in all other buffers.

Which is what I'd expect?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no