Function: match-buffers

match-buffers is a byte-compiled function defined in compat-29.el.

Signature

(match-buffers CONDITION &optional BUFFERS ARG)

Documentation

[Compatibility function for match-buffers, defined in Emacs 29.1. See (compat)
Emacs 29.1' for more details.]

Return a list of buffers that match CONDITION. See buffer-match for details on CONDITION. By default all buffers are checked, this can be restricted by passing an optional argument BUFFERS, set to a list of buffers to check. ARG is passed to buffer-match, for predicate conditions in CONDITION.

Source Code

;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-29.el
(compat-defun match-buffers (condition &optional buffers arg) ;; <compat-tests:match-buffers>
  "Return a list of buffers that match CONDITION.
See `buffer-match' for details on CONDITION.  By default all
buffers are checked, this can be restricted by passing an
optional argument BUFFERS, set to a list of buffers to check.
ARG is passed to `buffer-match', for predicate conditions in
CONDITION."
  (let (bufs)
    (dolist (buf (or buffers (buffer-list)))
      (when (buffer-match-p condition (get-buffer buf) arg)
        (push buf bufs)))
    bufs))