From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#20914: eieio/slot/group Date: Wed, 01 Jul 2015 09:31:35 -0400 Message-ID: References: <20150629.192952.75170699401312078.devel@pollock-nageoire.net> <20150701.060228.1839196597497012994.devel@pollock-nageoire.net> <20150701.083505.514312490268737442.devel@pollock-nageoire.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435757575 555 80.91.229.3 (1 Jul 2015 13:32:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jul 2015 13:32:55 +0000 (UTC) Cc: 20914-done@debbugs.gnu.org To: Pierre Lorenzon Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 01 15:32:45 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZAI85-0006tI-8R for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jul 2015 15:32:45 +0200 Original-Received: from localhost ([::1]:58515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAI84-0007yR-Kw for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jul 2015 09:32:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAI80-0007xh-JX for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 09:32:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAI7v-0006wX-Hq for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 09:32:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAI7v-0006wK-0F for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 09:32:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZAI7n-0006Qu-6O for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2015 09:32:34 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2015 13:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 20914 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 20914@debbugs.gnu.org, monnier@iro.umontreal.ca, devel@pollock-nageoire.net Original-Received: via spool by 20914-done@debbugs.gnu.org id=D20914.143575751224682 (code D ref 20914); Wed, 01 Jul 2015 13:32:03 +0000 Original-Received: (at 20914-done) by debbugs.gnu.org; 1 Jul 2015 13:31:52 +0000 Original-Received: from localhost ([127.0.0.1]:35463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAI7C-0006Q1-US for submit@debbugs.gnu.org; Wed, 01 Jul 2015 09:31:51 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:54875) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAI73-0006Pd-Da for 20914-done@debbugs.gnu.org; Wed, 01 Jul 2015 09:31:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A2FgA731xV/2cGNJ1cgxCEAoVVu0CEfoJNBAICgTw6EwEBAQEBAQGBCkEFg10BAQMBViMFCwsOJhIUGA0kiDcIzyMBAQEBAQEEAQEBAR6LOoUFB4QtBYtEqUAjhBQigngBAQE X-IPAS-Result: A0A2FgA731xV/2cGNJ1cgxCEAoVVu0CEfoJNBAICgTw6EwEBAQEBAQGBCkEFg10BAQMBViMFCwsOJhIUGA0kiDcIzyMBAQEBAQEEAQEBAR6LOoUFB4QtBYtEqUAjhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="128946136" Original-Received: from 157-52-6-103.cpe.teksavvy.com (HELO pastel.home) ([157.52.6.103]) by ironport2-out.teksavvy.com with ESMTP; 01 Jul 2015 09:31:35 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 39152616A0; Wed, 1 Jul 2015 09:31:35 -0400 (EDT) In-Reply-To: <20150701.083505.514312490268737442.devel@pollock-nageoire.net> (Pierre Lorenzon's message of "Wed, 01 Jul 2015 08:35:05 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104571 Archived-At: > Sorry in fact it works when patching and recompiling the whole > stuff.Recompiling only cl-preloaded.el is not enough. As the name suggests, cl-preloaded is ... preloaded into the "emacs" executable, so you need to recompile cl-preloaded.elc and then re-dump src/emacs. > Anyway copy-tree should be used and not copy-sequence for the > properties. Otherwise properties are not eq but car of them are > eq and that's not what we want. Oops, good point, tho copy-tree isn't right either (we don't want to copy the actual values). I installed the patch below, Stefan diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el index ed0639b..60f6542 100644 --- a/lisp/emacs-lisp/cl-preloaded.el +++ b/lisp/emacs-lisp/cl-preloaded.el @@ -195,7 +195,7 @@ (:constructor nil) (:constructor cl--make-slot-descriptor (name &optional initform type props)) - (:copier cl--copy-slot-descriptor)) + (:copier cl--copy-slot-descriptor-1)) ;; FIXME: This is actually not used yet, for circularity reasons! "Descriptor of structure slot." name ;Attribute name (symbol). @@ -205,6 +205,11 @@ ;; :documentation, :protection, :custom, :label, :group, :printer. (props nil :type alist)) +(defun cl--copy-slot-descriptor (slot) + (let ((new (cl--copy-slot-descriptor-1 slot))) + (cl-callf copy-alist (cl--slot-descriptor-props new)) + new)) + (cl-defstruct (cl--class (:constructor nil) (:copier nil))