[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat e370f9b7e7 25/84: Add match-buffers from Emacs 2
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat e370f9b7e7 25/84: Add match-buffers from Emacs 29 |
Date: |
Tue, 3 Jan 2023 08:57:32 -0500 (EST) |
branch: externals/compat
commit e370f9b7e7b2bfa679010ea37f03acc01a8ca4ea
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add match-buffers from Emacs 29
---
compat-29.el | 14 ++++++++++++++
compat.texi | 12 ++++++++++++
2 files changed, 26 insertions(+)
diff --git a/compat-29.el b/compat-29.el
index cf1ed41404..757f9e76ee 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -250,6 +250,20 @@ CONDITION is either:
(throw 'match t)))))))
(funcall match (list condition))))
+;;* UNTESTED
+(compat-defun match-buffers (condition &optional buffers arg)
+ "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 (compat--buffer-match-p condition (get-buffer buf) arg)
+ (push buf bufs)))
+ bufs))
+
;;;; Defined in subr-x.el
(compat-defun string-limit (string length &optional end coding-system)
diff --git a/compat.texi b/compat.texi
index 75da790901..c1e61be279 100644
--- a/compat.texi
+++ b/compat.texi
@@ -2434,6 +2434,18 @@ string), @code{(and)} (empty conjunction) or
@code{always}.
@xref{Buffer List,,,elisp}.
@end defun
+@c copied from lispref/buffers.texi
+@defun match-buffers condition &optional buffers arg
+This function returns a list of all buffers that satisfy a
+@code{condition}, as defined for @code{buffer-match-p}. By default
+all buffers are considered, but this can be restricted via the second
+optional @code{buffer-list} argument. Optional third argument
+@var{arg} will be used by @var{condition} in the same way as
+@code{buffer-match-p} does.
+
+@xref{Buffer List,,,elisp}.
+@end defun
+
@subsection Prefixed Definitions
- [elpa] externals/compat db53afa3a7 18/84: Add buffer-text-pixel-size from Emacs 29, (continued)
- [elpa] externals/compat db53afa3a7 18/84: Add buffer-text-pixel-size from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat a4036f9b1b 01/84: Prepare Emacs 29.1 compatibility, ELPA Syncer, 2023/01/03
- [elpa] externals/compat f21b114ec7 02/84: Add string-limit, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9083cfc4f6 05/84: Add get-display-property, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 87da1d984d 11/84: Begin documenting Emacs 29 support, ELPA Syncer, 2023/01/03
- [elpa] externals/compat c81333a6b0 30/84: Merge branch 'master' into emacs-29.1, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 2ee63f46b2 07/84: Make compat-font-lock dependency on compat-macs explicit, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 22b2634ada 06/84: Compile compat-macs before anything else, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 2e206a8304 21/84: Add prefixed plist-get from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat e13ca90cd7 12/84: Rewrite legacy compat-test definitions, ELPA Syncer, 2023/01/03
- [elpa] externals/compat e370f9b7e7 25/84: Add match-buffers from Emacs 29,
ELPA Syncer <=
- [elpa] externals/compat 4710da5fa7 28/84: Add file-parent-directory from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat bb86f3aa3b 37/84: Simplify compat--generate-testable, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 282f2dc6a7 41/84: Call install-fn in compat--generate-testable, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 3f3f2e44d5 43/84: Split compat-insert-into-buffer into multiple tests, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 933d6fdf80 24/84: Add buffer-match-p from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 8d17ffdd88 29/84: Add file-has-changed-p from Emacs 29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 252d33e897 31/84: Fix incompatible function calls in compat-29, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 9e0eb5b72f 33/84: Add compat-declare-version to compat-29.el, ELPA Syncer, 2023/01/03
- [elpa] externals/compat fdae099b00 34/84: Move if-let and related function from subr-x to subr, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 6ac6ed2a99 36/84: Use make-symbol instead of gensym in function-alias-p tests, ELPA Syncer, 2023/01/03