diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2017-03-15 22:48:28 -0400 |
---|---|---|
committer | Lars Brinkhoff <lars@nocrew.org> | 2017-04-04 08:23:46 +0200 |
commit | 8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0 (patch) | |
tree | 31f4a44bb5bc70144a0a7194b266f1e30fce3b9e /lisp/emacs-lisp/eieio-base.el | |
parent | 056548283884d61b1b9637c3e56855ce3a17274d (diff) | |
download | emacs-8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0.tar.gz emacs-8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0.tar.bz2 emacs-8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0.zip |
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.el | 3 |
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))) |