Closed robert-strandh closed 1 year ago
When I let Emacs reindent the function, I get
(defun class-scalar-and-relation-slots (class)
(loop :for slot :in (c2mop:class-slots (ensure-finalized class))
:if (relation-slot? slot)
:collect slot :into relation-slots
:else :if (initarg-slot? slot)
:collect slot :into scalar-slots
:finally (return (values scalar-slots relation-slots))))
That is, the :collect
line after the :else :if
line is indented differently. Is this the indentation you had in mind?
On a general note: Are you interested in the "universal" builder for a particular reason? I once had a use for it but that was years ago and nowadays I'm not so sure whether it is a good idea.
Yes, I think that's the right indentation. In the code I was looking at, all clauses except the first one were aligned and not aligned with the first one.
I have no idea what the "universal" builder is doing, because I don't recall seeing any documentation for it and I haven't looked at it very much yet. I was trying to understand what the cardinality (:MAP . KEY) was, and I found some code in this file that seemed to refer to it. So I found this problematic indentation.
The LOOP body of class-initarg-and-relation-slots is not correctly indented. I recommend the use of the contribution slime-indentation to get it right.