Function: cider--match-repl-type

cider--match-repl-type is a byte-compiled function defined in cider-connection.el.

Signature

(cider--match-repl-type TYPE BUFFER)

Documentation

Return non-nil if TYPE matches BUFFER's REPL type.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-connection.el
(defun cider--match-repl-type (type buffer)
  "Return non-nil if TYPE matches BUFFER's REPL type."
  (let ((buffer-repl-type (cider-repl-type buffer)))
    (cond ((null buffer-repl-type) nil)
          ((or (null type) (eq type 'multi) (eq type 'any)) t)
          ((listp type) (member buffer-repl-type type))
          (t
           (or (string= type buffer-repl-type)
               (let ((capabilities
                      (buffer-local-value 'cider-connection-capabilities buffer)))
                 (cond ((listp type)
                        (seq-some (lambda (it) (member it capabilities)) type))
                       (t (member type capabilities)))))))))