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.

Full log


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?




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.