From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#28587: 26.0.60; Don't write object name strings in object-write method Date: Sun, 24 Sep 2017 14:11:23 -0700 Message-ID: <87efqvg5tw.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1506287538 6818 195.159.176.226 (24 Sep 2017 21:12:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 24 Sep 2017 21:12:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) To: 28587@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 24 23:12:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwEC9-0001Fm-GO for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Sep 2017 23:12:09 +0200 Original-Received: from localhost ([::1]:39453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwECG-00068W-UA for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Sep 2017 17:12:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwECB-0005xU-3F for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2017 17:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwEC2-0000UO-If for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2017 17:12:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwEC2-0000UI-Di for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2017 17:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dwEC2-0003u8-5U for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2017 17:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2017 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150628750514980 (code B ref -1); Sun, 24 Sep 2017 21:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2017 21:11:45 +0000 Original-Received: from localhost ([127.0.0.1]:56635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwEBl-0003tY-FI for submit@debbugs.gnu.org; Sun, 24 Sep 2017 17:11:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwEBk-0003tN-JX for submit@debbugs.gnu.org; Sun, 24 Sep 2017 17:11:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwEBe-0000NY-GA for submit@debbugs.gnu.org; Sun, 24 Sep 2017 17:11:39 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:37230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwEBe-0000NT-Bw for submit@debbugs.gnu.org; Sun, 24 Sep 2017 17:11:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwEBd-0005jS-9H for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2017 17:11:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwEBZ-0000M9-7k for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2017 17:11:37 -0400 Original-Received: from mail.ericabrahamsen.net ([50.56.99.223]:57362) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwEBZ-0000K5-1f for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2017 17:11:33 -0400 Original-Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id E064EBFAF6 for ; Sun, 24 Sep 2017 21:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1506287485; bh=Jjg6QedR24HPVevqQEbRBpZoD/JAVMYVamtWOuAsdq8=; h=From:To:Subject:Date:From; b=P7YwEqmnw7ZAiNSykJ0cs2gvTBxAWVt45fYps8/ik/yPg+ybbVGZv+42+yS8W8YoW peoyLzc63Mp4VAxbXv0CwT4g/6O9ci7JM0cDbvy6bf5gDm70X5hD5I991CYEyL6fGW gaFfw6E+7EdEr6ngg7w48vmN7aBfG+Ypbq9744zE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137370 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Do-not-print-object-name-string-in-object-write-meth.patch >From 77a270ec916854ecb7e9ccaca444fe8ccbeab843 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen 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 --=-=-=--