Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit db1c23f

Browse files
committed
fix nestedness of results
1 parent 5a95892 commit db1c23f

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/defclass-std.lisp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,23 @@
125125
(defmacro defclass/std (name direct-superclasses direct-slots &rest options)
126126
"Shortcut macro to the DEFCLASS macro. See README for syntax and usage."
127127
`(defclass ,name ,direct-superclasses
128-
,@(mapcar (lambda (line)
129-
(let ((prefix (if (or (member :with-prefix line)
130-
(member :with line)
131-
*with-prefix*)
132-
(concatenate 'string (string name) "-")
133-
""))
134-
(split-kws-line (split-fusioned-keywords line)))
135-
(check-for-repeated-keywords split-kws-line)
136-
(replace-keywords split-kws-line prefix)))
137-
direct-slots)
128+
,(process-slots direct-slots name)
138129
,@options))
139130

131+
(defun process-slots (direct-slots classname)
132+
(let ((processed (mapcar (lambda (line)
133+
(let ((prefix (if (or (member :with-prefix line)
134+
(member :with line)
135+
*with-prefix*)
136+
(concatenate 'string (string classname) "-")
137+
""))
138+
(split-kws-line (split-fusioned-keywords line)))
139+
(check-for-repeated-keywords split-kws-line)
140+
(replace-keywords split-kws-line prefix)))
141+
direct-slots)))
142+
;; un-nest the lists
143+
(reduce #'append processed)))
144+
140145
(defmacro class/std (name &body defaulted-slots)
141146
"Shortcut macro to the DEFCLASS/STD macro."
142147
`(defclass/std ,name ()

0 commit comments

Comments
 (0)