hopefully fix setf problem

This commit is contained in:
~keith 2022-02-22 05:55:57 +00:00
parent 9b6614fc45
commit 65fb98c8c4
Signed by: keith
GPG key ID: 5BEBEEAB2C73D520

View file

@ -16,10 +16,10 @@
for form = (car entry)
do (setf expr
(cond ((consp form) `(,(car form) ,expr ,@(cdr form)))
((eq form :slot) (prog1
`(slot-value ,expr ',(cadr entry))
(unless (cdr entry)
((eq form :slot) (prog2
(unless (cadr entry)
(error "Unexpected end of list (expected slot name)"))
`(slot-value ,expr ',(cadr entry))
(rplacd entry (cddr entry))))
((symbolp form) `(,form ,expr))
(t (error "Unexpected form ~S" form))