Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
;;; Neat convenience function for working with Elisp's EIEIO objects
(defmacro oref* (object &rest slots)
"Like `oref', but each slot in SLOTS is applied in sequence.
For example,
\(oref* obj :inner :property)
is equivalent to
\(oref \(oref obj :inner) :property)"
(while slots
(setq object (list 'oref object (car slots))
slots (cdr slots)))
object)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment