GNU bug report logs - #40975
28.0.50; Variable gets buffer-local unexpectedly

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Thu, 30 Apr 2020 02:27:01 UTC

Severity: normal

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Variable gets buffer-local unexpectedly
Date: Thu, 30 Apr 2020 04:26:16 +0200
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





This bug report was last modified 4 years and 215 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.