unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64595: 30.0.50; 13-years old commented code in src/data.c:1608 (set_internal)
@ 2023-07-13 12:31 Ihor Radchenko
  2023-07-13 13:17 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2023-07-13 12:31 UTC (permalink / raw)
  To: 64595

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@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>





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

end of thread, other threads:[~2023-09-05  6:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 12:31 bug#64595: 30.0.50; 13-years old commented code in src/data.c:1608 (set_internal) Ihor Radchenko
2023-07-13 13:17 ` Eli Zaretskii
2023-07-13 17:21   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-05  6:12     ` Stefan Kangas

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).