GNU bug report logs - #64595
30.0.50; 13-years old commented code in src/data.c:1608 (set_internal)

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Thu, 13 Jul 2023 12:32:02 UTC

Severity: wishlist

Found in version 30.0.50

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64595 in the body.
You can then email your comments to 64595 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#64595; Package emacs. (Thu, 13 Jul 2023 12:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ihor Radchenko <yantar92 <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Jul 2023 12:32:02 GMT) Full text and rfc822 format available.

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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; 13-years old commented code in src/data.c:1608 (set_internal)
Date: Thu, 13 Jul 2023 12:31:03 +0000
Hello,

While reading the sources, I found the following commented piece of
code in set_internal:

  /* If restoring in a dead buffer, do nothing.  */
  /* if (BUFFERP (where) && NILP (XBUFFER (where)->name))
      return; */

This code has been changed 13 years ago and also commented immediately
(in the same commit):

94b612ad880e0d6eab6659347cb66e3a5310f8be
Author:     Stefan Monnier <monnier <at> iro.umontreal.ca>
AuthorDate: Fri May 7 16:33:00 2010 -0400

Try and fix unbind_to when localness of binding has changed
* eval.c (unbind_to): Don't unbind a local binding into the global
binding when the local binding disappeared.  Inversely, don't unbind
a global binding into a newly created local binding.
* data.c (set_internal): Make its `buf' arg into a `where' arg so we
can specify the frame to use, when applicable.  Adjust callers.

-  if (buf == 0)
-    buf = current_buffer;
-
   /* If restoring in a dead buffer, do nothing.  */
-  if (NILP (buf->name))
-    return;
+  /* if (BUFFERP (where) && NILP (XBUFFER (where)->name))
+      return; */

I assume that after 13 years, it is safe to remove it.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-07-06 built on localhost
Repository revision: d97b77e6c66db46b198c696f83458aa141794727
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Gentoo Linux

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64595; Package emacs. (Thu, 13 Jul 2023 13:18:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 64595 <at> debbugs.gnu.org
Subject: Re: bug#64595: 30.0.50;
 13-years old commented code in src/data.c:1608 (set_internal)
Date: Thu, 13 Jul 2023 16:17:20 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Date: Thu, 13 Jul 2023 12:31:03 +0000
> 
> While reading the sources, I found the following commented piece of
> code in set_internal:
> 
>   /* If restoring in a dead buffer, do nothing.  */
>   /* if (BUFFERP (where) && NILP (XBUFFER (where)->name))
>       return; */
> 
> This code has been changed 13 years ago and also commented immediately
> (in the same commit):
> 
> 94b612ad880e0d6eab6659347cb66e3a5310f8be
> Author:     Stefan Monnier <monnier <at> iro.umontreal.ca>
> AuthorDate: Fri May 7 16:33:00 2010 -0400
> 
> Try and fix unbind_to when localness of binding has changed
> * eval.c (unbind_to): Don't unbind a local binding into the global
> binding when the local binding disappeared.  Inversely, don't unbind
> a global binding into a newly created local binding.
> * data.c (set_internal): Make its `buf' arg into a `where' arg so we
> can specify the frame to use, when applicable.  Adjust callers.
> 
> -  if (buf == 0)
> -    buf = current_buffer;
> -
>    /* If restoring in a dead buffer, do nothing.  */
> -  if (NILP (buf->name))
> -    return;
> +  /* if (BUFFERP (where) && NILP (XBUFFER (where)->name))
> +      return; */
> 
> I assume that after 13 years, it is safe to remove it.

Stefan?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64595; Package emacs. (Thu, 13 Jul 2023 17:22:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Ihor Radchenko <yantar92 <at> posteo.net>, 64595 <at> debbugs.gnu.org
Subject: Re: bug#64595: 30.0.50; 13-years old commented code in
 src/data.c:1608 (set_internal)
Date: Thu, 13 Jul 2023 13:21:09 -0400
>> I assume that after 13 years, it is safe to remove it.

:-)

> Stefan?

Of course,


        Stefan





Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 04 Sep 2023 08:22:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Tue, 05 Sep 2023 06:13:02 GMT) Full text and rfc822 format available.

Notification sent to Ihor Radchenko <yantar92 <at> posteo.net>:
bug acknowledged by developer. (Tue, 05 Sep 2023 06:13:02 GMT) Full text and rfc822 format available.

Message #18 received at 64595-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Ihor Radchenko <yantar92 <at> posteo.net>, 64595-done <at> debbugs.gnu.org
Subject: Re: bug#64595: 30.0.50; 13-years old commented code in
 src/data.c:1608 (set_internal)
Date: Mon, 4 Sep 2023 23:12:47 -0700
Version: 30.1

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

>>> I assume that after 13 years, it is safe to remove it.
>
> :-)
>
>> Stefan?
>
> Of course,

Thanks, done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 03 Oct 2023 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 256 days ago.

Previous Next


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