unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40975: 28.0.50; Variable gets buffer-local unexpectedly
@ 2020-04-30  2:26 Michael Heerdegen
  2020-10-22 14:27 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2020-04-30  2:26 UTC (permalink / raw)
  To: 40975


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.

Maybe there is a problem in this case because the `setq' setting is in
the same lexical scope as the `make-local-variable' call?

TIA,

Michael.



In GNU Emacs 28.0.50 (build 57, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo version 1.16.0)
 of 2020-04-29 built on drachen
Repository revision: fe9be663833db1bf99f38c981378255f88ff5d06
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-24 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30  2:26 bug#40975: 28.0.50; Variable gets buffer-local unexpectedly Michael Heerdegen
2020-10-22 14:27 ` Lars Ingebrigtsen
2020-10-23 18:07   ` Michael Heerdegen
2020-10-24 19:53     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).