with-slots

with-slots is a Lisp macro in `eieio.el'.

(with-slots SPEC-LIST OBJECT &rest BODY)

Bind SPEC-LIST lexically to slot values in OBJECT, and execute BODY.
This establishes a lexical environment for referring to the slots in
the instance named by the given slot-names as though they were
variables. Within such a context the value of the slot can be
specified by using its slot name, as if it were a lexically bound
variable. Both setf and setq can be used to set the value of the
slot.

SPEC-LIST is of a form similar to `let'. For example:

((VAR1 SLOT1)
SLOT2
SLOTN
(VARN+1 SLOTN+1))

Where each VAR is the local variable given to the associated
SLOT. A slot specified without a variable name is given a
variable name of the same name as the slot.