@@ -127,7 +127,7 @@ depth in case one explainer was appended to another.")
127
127
(funcall (-flip #'string-join ) " \n " )
128
128
(replace-regexp-in-string (concat " ^" initial-prefix " \n " ) " " ))))
129
129
130
- (cl-defgeneric elsa--reset-depth ((this elsa-explainer))
130
+ (cl-defmethod elsa--reset-depth ((this elsa-explainer))
131
131
(let* ((messages (elsa-get-messages this))
132
132
(min-depth-message (--min-by (> (oref it depth)
133
133
(oref other depth))
@@ -139,8 +139,8 @@ depth in case one explainer was appended to another.")
139
139
(setf (elsa-get-depth this) 0 ))
140
140
this)
141
141
142
- (cl-defgeneric elsa--append-explainer ((this elsa-explainer)
143
- (other elsa-explainer))
142
+ (cl-defmethod elsa--append-explainer ((this elsa-explainer)
143
+ (other elsa-explainer))
144
144
" Append OTHER explainer to THIS on the same level."
145
145
(let* ((this-messages (copy-sequence (elsa-get-messages this)))
146
146
(other-messages (mapcar #'clone (elsa-get-messages other)))
@@ -152,8 +152,16 @@ depth in case one explainer was appended to another.")
152
152
(append other-messages this-messages))
153
153
this))
154
154
155
- (cl-defgeneric elsa--attach-explainer ((this elsa-explainer)
156
- (other elsa-explainer))
155
+ (cl-defmethod elsa--append-explainer ((this elsa-explainer)
156
+ (other string))
157
+ (elsa--append-explainer
158
+ this
159
+ (elsa-with-temp-explainer explainer
160
+ (elsa-explain explainer other)
161
+ explainer)))
162
+
163
+ (cl-defmethod elsa--attach-explainer ((this elsa-explainer)
164
+ (other elsa-explainer))
157
165
" Attach OTHER explainer to THIS indented by one extra level."
158
166
(let* ((this-messages (copy-sequence (elsa-get-messages this)))
159
167
(other-messages (mapcar #'clone (elsa-get-messages other)))
0 commit comments