@@ -246,14 +246,19 @@ The error types are represented as strings."
246
246
247
247
(defvar cider-stacktrace--all-negative-filters
248
248
'(clj tooling dup java repl)
249
- " Filters that remove stackframes" )
249
+ " Filters that remove stackframes. " )
250
250
251
251
(defvar cider-stacktrace--all-positive-filters
252
252
'(project)
253
- " Filters that ensure stackframes are shown" )
253
+ " Filters that ensure stackframes are shown. " )
254
254
255
255
(defun cider-stacktrace--face-for-filter (filter neg-filters pos-filters )
256
- " Return whether we should mark the filter is active or not."
256
+ " Return whether we should mark the FILTER is active or not.
257
+
258
+ NEG-FILTERS and POS-FILTERS are lists of filters to check FILTER's type.
259
+
260
+ NEG-FILTERS dictate which frames should be hidden while POS-FILTERS can
261
+ override this and ensure that those frames are shown."
257
262
(cond ((member filter cider-stacktrace--all-negative-filters)
258
263
(if (member filter neg-filters)
259
264
'cider-stacktrace-filter-active-face
@@ -273,7 +278,7 @@ The error types are represented as strings."
273
278
Find buttons with a 'filter property; if filter is a member of FILTERS, or
274
279
if filter is nil ('show all') and the argument list is non-nil, fontify the
275
280
button as disabled. Upon finding text with a 'hidden-count property, stop
276
- searching and update the hidden count text. POS-FILTERS is the list of
281
+ searching and update the hidden count text. POS-FILTERS is the list of
277
282
positive filters to always include."
278
283
(with-current-buffer cider-error-buffer
279
284
(save-excursion
@@ -606,7 +611,10 @@ prompt and whether to use a new window. Similar to `cider-find-var'."
606
611
(fill-region beg (point )))))
607
612
608
613
(defun cider-stacktrace-render-filters (buffer special-filters filters )
609
- " Emit into BUFFER toggle buttons for each of the FILTERS."
614
+ " Emit into BUFFER toggle buttons for each of the FILTERS.
615
+
616
+ SPECIAL-FILTERS are filters that show stack certain stack frames, hiding
617
+ others."
610
618
(with-current-buffer buffer
611
619
(insert " Show: " )
612
620
(dolist (filter special-filters)
@@ -627,7 +635,7 @@ prompt and whether to use a new window. Similar to `cider-find-var'."
627
635
'help-echo (format " Toggle %s stack frames "
628
636
(car filter)))
629
637
(insert " " ))
630
-
638
+
631
639
(let ((hidden " (0 frames hidden)" ))
632
640
(put-text-property 0 (length hidden) 'hidden-count t hidden)
633
641
(insert " " hidden " \n " ))))
0 commit comments