From 4a7529d24b8cc42f98c1edc4ddf57cff82af8d80 Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 14 May 1999 11:15:24 +0000 Subject: [PATCH] (luna-set-slot-value): New function. --- luna.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/luna.el b/luna.el index 6586c3a..7b348de 100644 --- a/luna.el +++ b/luna.el @@ -132,9 +132,13 @@ It must be plist and each slot name must have prefix `:'." `(luna-class-slot-index (luna-find-class (luna-class-name ,entity)) ,slot-name)) -(defsubst luna-slot-value (entity slot-name) - "Return value of SLOT-NAME of ENTITY." - (aref entity (luna-slot-index entity slot-name))) +(defsubst luna-slot-value (entity slot) + "Return the value of SLOT of ENTITY." + (aref entity (luna-slot-index entity slot))) + +(defsubst luna-set-slot-value (entity slot value) + "Store VALUE into SLOT of ENTITY." + (aset entity (luna-slot-index entity slot) value)) (defmacro luna-define-method (name args &rest body) "Define NAME as a method function of (nth 1 (car ARGS)) backend. -- 1.7.10.4