This repository was archived by the owner on Mar 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change 125
125
(defmacro defclass/std (name direct-superclasses direct-slots &rest options)
126
126
" Shortcut macro to the DEFCLASS macro. See README for syntax and usage."
127
127
` (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)
138
129
,@ options))
139
130
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
+
140
145
(defmacro class/std (name &body defaulted-slots)
141
146
" Shortcut macro to the DEFCLASS/STD macro."
142
147
` (defclass/std , name ()
You can’t perform that action at this time.
0 commit comments