Function: projectile--buffer-matches-conditions
projectile--buffer-matches-conditions is a byte-compiled function
defined in projectile.el.
Signature
(projectile--buffer-matches-conditions BUFFER CONDITIONS)
Documentation
Return non-nil if BUFFER satisfies any condition in CONDITIONS.
CONDITIONS is a list using the DSL documented in
projectile-kill-buffers-filter. Modeled on project.el's
project--buffer-check.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--buffer-matches-conditions (buffer conditions)
"Return non-nil if BUFFER satisfies any condition in CONDITIONS.
CONDITIONS is a list using the DSL documented in
`projectile-kill-buffers-filter'. Modeled on project.el's
`project--buffer-check'."
(catch 'match
(dolist (c conditions)
(when (cond
((stringp c)
(string-match-p c (buffer-name buffer)))
((functionp c)
(funcall c buffer))
((eq (car-safe c) 'major-mode)
(eq (buffer-local-value 'major-mode buffer) (cdr c)))
((eq (car-safe c) 'derived-mode)
(provided-mode-derived-p
(buffer-local-value 'major-mode buffer) (cdr c)))
((eq (car-safe c) 'not)
(not (projectile--buffer-matches-conditions buffer (cdr c))))
((eq (car-safe c) 'or)
(projectile--buffer-matches-conditions buffer (cdr c)))
((eq (car-safe c) 'and)
(seq-every-p
(apply-partially #'projectile--buffer-matches-conditions buffer)
(mapcar #'list (cdr c)))))
(throw 'match t)))))