Subject: bug#44943: closed (Re: bug#44943: 28.0.50; defvar may return INITVALUE and overwrite symbol's value)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 29 Nov 2020 12:07:01 +0000

Your bug report

#44943: 28.0.50; defvar may return INITVALUE and overwrite symbol's value

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
44943: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44943
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#44943: 28.0.50; defvar may return INITVALUE and overwrite symbol's value
From: Kazuhiro Ito <[email-masked]>
To: Lars Ingebrigtsen <[email-masked]>
Cc: [email-masked]
Date: Sun, 29 Nov 2020 21:06:26 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

> > When evaluate below codes, I get unexpected result.
> >
> > (defvar test 1)
> >
> > -> test
> >
> > It is expected.
> >
> > (defvar test 2)
> >
> > -> 2
> >
> > It should return 'test'.
> >
> > (symbol-value 'test)
> >
> > -> 2
> >
> > It should return 1.
> 
> When you say "evaluate", what do you mean?  Doing `C-x C-e' after the
> form?  If it's the latter, then the doc string explains what's
> happening (and this is new behaviour in Emacs 28):

I meant C-j in *scratch* buffer (eval-print-last-sexp) and `C-x C-e'.
They return the same result.  I didn't notice the change of
eval-last-sexp, sorry.  I'm closing this issue.

-- 
Kazuhiro Ito

Subject: 28.0.50; defvar may return INITVALUE and overwrite symbol's value
From: Kazuhiro Ito <[email-masked]>
To: [email-masked]
Date: Sun, 29 Nov 2020 19:49:22 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

When evaluate below codes, I get unexpected result.

(defvar test 1)

-> test

It is expected.

(defvar test 2)

-> 2

It should return 'test'.

(symbol-value 'test)

-> 2

It should return 1.

-- 
Kazuhiro Ito