Function: cider-stacktrace-indicate-filters

cider-stacktrace-indicate-filters is a byte-compiled function defined in cider-stacktrace.el.

Signature

(cider-stacktrace-indicate-filters FILTERS POS-FILTERS)

Documentation

Update enabled state of filter buttons.

Find buttons with a filter property; if filter is a member of FILTERS, or if filter is nil (show all) and the argument list is non-nil, fontify the button as disabled. Upon finding text with a hidden-count property, stop searching and update the hidden count text. POS-FILTERS is the list of positive filters to always include.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-stacktrace.el
(defun cider-stacktrace-indicate-filters (filters pos-filters)
  "Update enabled state of filter buttons.

Find buttons with a `filter' property; if filter is a member of FILTERS, or
if filter is nil (`show all') and the argument list is non-nil, fontify the
button as disabled.  Upon finding text with a `hidden-count' property, stop
searching and update the hidden count text.  POS-FILTERS is the list of
positive filters to always include."
  (with-current-buffer cider-error-buffer
    (save-excursion
      (goto-char (point-min))
      (let ((inhibit-read-only t))
        ;; Toggle buttons
        (while (not (or (get-text-property (point) 'hidden-count) (eobp)))
          (let ((button (button-at (point))))
            (when button
              (let* ((filter (button-get button 'filter))
                     (face (cider-stacktrace--face-for-filter filter
                                                              filters
                                                              pos-filters)))
                (button-put button 'face face)))
            (goto-char (or (next-property-change (point))
                           (point-max)))))
        ;; Update hidden count
        (when (and (get-text-property (point) 'hidden-count)
                   (re-search-forward "[0-9]+" (line-end-position) t))
          (replace-match
           (number-to-string cider-stacktrace-hidden-frame-count)))))))