diff options
| author | Stefan Monnier | 2015-07-01 09:31:25 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-07-01 09:31:25 -0400 |
| commit | 87464d637a698f65e2bbdd18fa4a464f804cc5fc (patch) | |
| tree | 640affbd5f2c286635af16d306ba055b21823a0f | |
| parent | 3d759f4f6f2a20abbc05225a55d35c5daf093ff6 (diff) | |
| download | emacs-87464d637a698f65e2bbdd18fa4a464f804cc5fc.tar.gz emacs-87464d637a698f65e2bbdd18fa4a464f804cc5fc.zip | |
(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).
| -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 @@ | |||
| 195 | (:constructor nil) | 195 | (:constructor nil) |
| 196 | (:constructor cl--make-slot-descriptor | 196 | (:constructor cl--make-slot-descriptor |
| 197 | (name &optional initform type props)) | 197 | (name &optional initform type props)) |
| 198 | (:copier cl--copy-slot-descriptor)) | 198 | (:copier cl--copy-slot-descriptor-1)) |
| 199 | ;; FIXME: This is actually not used yet, for circularity reasons! | 199 | ;; FIXME: This is actually not used yet, for circularity reasons! |
| 200 | "Descriptor of structure slot." | 200 | "Descriptor of structure slot." |
| 201 | name ;Attribute name (symbol). | 201 | name ;Attribute name (symbol). |
| @@ -205,6 +205,11 @@ | |||
| 205 | ;; :documentation, :protection, :custom, :label, :group, :printer. | 205 | ;; :documentation, :protection, :custom, :label, :group, :printer. |
| 206 | (props nil :type alist)) | 206 | (props nil :type alist)) |
| 207 | 207 | ||
| 208 | (defun cl--copy-slot-descriptor (slot) | ||
| 209 | (let ((new (cl--copy-slot-descriptor-1 slot))) | ||
| 210 | (cl-callf copy-alist (cl--slot-descriptor-props new)) | ||
| 211 | new)) | ||
| 212 | |||
| 208 | (cl-defstruct (cl--class | 213 | (cl-defstruct (cl--class |
| 209 | (:constructor nil) | 214 | (:constructor nil) |
| 210 | (:copier nil)) | 215 | (:copier nil)) |