summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-print.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-10-31 10:57:44 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2021-10-31 10:58:43 -0400
commitd553e603f405acb06ad9ea233543ebe6ce319210 (patch)
tree679f835c197742e32b222ea59af69d55b20673cb /lisp/emacs-lisp/cl-print.el
parentc062c9d4db0ed5d9a1bc45696ae660234d37d1cf (diff)
downloademacs-d553e603f405acb06ad9ea233543ebe6ce319210.tar.gz
emacs-d553e603f405acb06ad9ea233543ebe6ce319210.tar.bz2
emacs-d553e603f405acb06ad9ea233543ebe6ce319210.zip
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.
Diffstat (limited to 'lisp/emacs-lisp/cl-print.el')
0 files changed, 0 insertions, 0 deletions