-
-
Save alphapapa/6ccd77485523d4d2bf73b7bf70731212 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; 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