diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-04 15:06:47 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-04 15:06:47 -0400 |
commit | 1f4f6b956bee611ffa406b3851e5264ee74e3bfb (patch) | |
tree | 4d24cdef860e41b611c400492ef4a85b9a1b156a /test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el | |
parent | 6c4a4cc94e9fea809b518da9fe9e581a6031a6df (diff) | |
download | emacs-1f4f6b956bee611ffa406b3851e5264ee74e3bfb.tar.gz emacs-1f4f6b956bee611ffa406b3851e5264ee74e3bfb.tar.bz2 emacs-1f4f6b956bee611ffa406b3851e5264ee74e3bfb.zip |
OClosure: add support for `slot-value`
* lisp/emacs-lisp/oclosure.el (oclosure--slot-index)
(oclosure--slot-value, oclosure--set-slot-value): New functions.
* lisp/emacs-lisp/eieio-core.el (eieio-oset, eieio-oref):
Consolidate the type test. Use `oclosure--(set-)slot-value`.
(eieio--validate-slot-value, eieio--validate-class-slot-value):
Don't presume `class` is an EIEIO class.
(eieio--class): Fix bogus `:type` info.
(eieio--object-class): Simplify.
(eieio--known-slot-name-p): New function.
(eieio-oref, eieio-oref-default, eieio-oset-default): Use it.
* test/lisp/emacs-lisp/oclosure-tests.el: Require `eieio`.
(oclosure-test): Make `name` field mutable.
(oclosure-test-slot-value): New test.
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el')
0 files changed, 0 insertions, 0 deletions