1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
emacs/doc
Stefan Monnier d553e603f4 eieio-core.el: Make slot-value work on defstructs
Adjust the values in EIEIO's index-tables so they are compatible with those
of defstructs.

* lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Don't add the
`eieio--object-num-slots` offset.
(eieio-defclass-internal): Add the `eieio--object-num-slots` offset
here instead.
(eieio-oref): Allow its use on `cl-structure-object`.

* lisp/emacs-lisp/eieio.el (eieio-pcase-slot-index-from-index-table):
Don't need to add the `eieio--object-num-slots` offset.

* doc/misc/eieio.texi (Accessing Slots, Accessing Slots):
Mention the use on structs.

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-defstruct-slot-value): New test.
2021-10-31 10:58:43 -04:00
..
emacs Expand connection-local variables example in doc/emacs/custom.texi 2021-10-30 17:40:18 +02:00
lispintro Merge from origin/emacs-28 2021-10-29 09:20:05 -07:00
lispref Move the documentation of 'string-glyph-split' to proper place 2021-10-30 20:29:40 +03:00
man * doc/man/emacs.1.in: Add --no-x-resources. (Bug#50855) 2021-09-28 15:45:27 +02:00
misc eieio-core.el: Make slot-value work on defstructs 2021-10-31 10:58:43 -04:00