Created
May 8, 2017 04:47
-
-
Save vermiculus/89d6f18c60915dd75044b7d6190217cd to your computer and use it in GitHub Desktop.
This file contains 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