Subject: 26.0.60; Don't write object name strings in object-write method
From: Eric Abrahamsen <[email-masked]>
To: [email-masked]
Date: Sun, 24 Sep 2017 14:11:23 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

If we're going to ignore them, we might as well not write them to begin
with.

Are there any other places that expect the presence of this name string?

In GNU Emacs 26.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
 of 2017-09-22 built on clem
Repository revision: 908af46abdb2c19ff3c72543e4fadf8e0ed82d2b
From 77a270ec916854ecb7e9ccaca444fe8ccbeab843 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <[email-masked]>
Date: Sun, 24 Sep 2017 14:07:26 -0700
Subject: [PATCH] Do not print object name string in object-write method

* lisp/emacs-lisp/eieio.el (object-write): The object name string is
  obsolete, might as well save some bytes.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
  Check for presence of object name string, and ignore.
---
 lisp/emacs-lisp/eieio-base.el | 7 +++++--
 lisp/emacs-lisp/eieio.el      | 2 --
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 6b39b4f262..4c6fbae12c 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -255,8 +255,11 @@ eieio-persistent-convert-list-to-object
 Note: This function recurses when a slot of :type of some object is
 identified, and needing more object creation."
   (let* ((objclass (nth 0 inputlist))
-	 ;; (objname (nth 1 inputlist))
-	 (slots (nthcdr 2 inputlist))
+	 ;; Earlier versions of `object-write' added a string name for
+	 ;; the object, now obsolete.
+	 (slots (nthcdr
+                 (if (stringp (nth 1 inputlist)) 2 1)
+                 inputlist))
 	 (createslots nil)
 	 (class
 	  (progn
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 75f1097acf..448d5e6fe2 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -874,8 +874,6 @@ eieio-print-depth
     (princ (make-string (* eieio-print-depth 2) ? ))
     (princ "(")
     (princ (symbol-name (eieio--class-constructor (eieio-object-class this))))
-    (princ " ")
-    (prin1 (eieio-object-name-string this))
     (princ "\n")
     ;; Loop over all the public slots
     (let ((slots (eieio--class-slots cv))
-- 
2.14.1