make-load-form: cons: initialize car in init form

This way we do not need to worry about cons recursion in make forms.
This commit is contained in:
Daniel Kochmański 2020-03-14 10:32:31 +01:00
parent dcdb53f29e
commit 3b6dd501e6

View file

@ -128,8 +128,10 @@ printer and we should rather use MAKE-LOAD-FORM."
x))))
(and init-forms `(progn ,@init-forms)))))
(cons
(values `(cons ,(maybe-quote (car object)) nil)
(and (rest object) `(rplacd ,(maybe-quote object)
(values `(cons nil nil)
`(progn (rplaca ,(maybe-quote object)
,(maybe-quote (car object)))
(rplacd ,(maybe-quote object)
,(maybe-quote (cdr object))))))
(hash-table
(let* ((content (ext:hash-table-content object))