bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20914: eieio/slot/group


From: Stefan Monnier
Subject: bug#20914: eieio/slot/group
Date: Wed, 01 Jul 2015 09:31:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]