summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eieio-base.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-03-15 22:48:28 -0400
committerLars Brinkhoff <lars@nocrew.org>2017-04-04 08:23:46 +0200
commit8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0 (patch)
tree31f4a44bb5bc70144a0a7194b266f1e30fce3b9e /lisp/emacs-lisp/eieio-base.el
parent056548283884d61b1b9637c3e56855ce3a17274d (diff)
downloademacs-8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0.tar.gz
Make EIEIO use records.
* lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-object-generalizer): Adjust to new tags. * lisp/emacs-lisp/eieio-core.el: Use records, and place the class object directly as tag. (eieio--object-class): Adjust to new tag representation. (eieio-object-p): Rewrite, and adapt to new `type-of' behavior. (eieio-defclass-internal): Use `make-record'. (eieio--generic-generalizer): Adjust generalizer code accordingly. * lisp/emacs-lisp/eieio.el (make-instance, clone): Use copy-record. * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `recordp'. * doc/lispref/records.texi, doc/misc/eieio.texi: Update for records.
Diffstat (limited to 'lisp/emacs-lisp/eieio-base.el')
-rw-r--r--lisp/emacs-lisp/eieio-base.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 986d0285172..33c71ec5807 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -294,8 +294,7 @@ Second, any text properties will be stripped from strings."
(cond ((consp proposed-value)
;; Lists with something in them need special treatment.
(let* ((slot-idx (- (eieio--slot-name-index class slot)
- (eval-when-compile
- (length (cl-struct-slot-info 'eieio--object)))))
+ (eval-when-compile eieio--object-num-slots)))
(type (cl--slot-descriptor-type (aref (eieio--class-slots class)
slot-idx)))
(classtype (eieio-persistent-slot-type-is-class-p type)))