diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-07-01 09:31:25 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-07-01 09:31:25 -0400 |
commit | 87464d637a698f65e2bbdd18fa4a464f804cc5fc (patch) | |
tree | 640affbd5f2c286635af16d306ba055b21823a0f /lisp/emacs-lisp/cl-preloaded.el | |
parent | 3d759f4f6f2a20abbc05225a55d35c5daf093ff6 (diff) | |
download | emacs-87464d637a698f65e2bbdd18fa4a464f804cc5fc.tar.gz |
(cl--copy-slot-descriptor): Copy the `props' alist as well
* lisp/emacs-lisp/cl-preloaded.el (cl--copy-slot-descriptor-1):
Rename from cl--copy-slot-descriptor.
(cl--copy-slot-descriptor): New function. Copy the alist (bug#20914).
Diffstat (limited to 'lisp/emacs-lisp/cl-preloaded.el')
-rw-r--r-- | lisp/emacs-lisp/cl-preloaded.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el index ed0639b63ab..60f654258b0 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)) |