emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 497b2689da: * subr.el (buffer-match-p): Add t as trivial a condit


From: Philip Kaludercic
Subject: master 497b2689da: * subr.el (buffer-match-p): Add t as trivial a condition
Date: Fri, 29 Jul 2022 12:04:27 -0400 (EDT)

branch: master
commit 497b2689dad0770cd90ba0410a7a120ad94b6def
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    * subr.el (buffer-match-p): Add t as trivial a condition
---
 lisp/subr.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/subr.el b/lisp/subr.el
index 6b121a314a..9f7cb3ab6a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -6899,6 +6899,7 @@ lines."
 (defun buffer-match-p (condition buffer-or-name &optional arg)
   "Return non-nil if BUFFER-OR-NAME matches CONDITION.
 CONDITION is either:
+- the symbol t, to always match
 - a regular expression, to match a buffer name,
 - a predicate function that takes a buffer object and ARG as
   arguments, and returns non-nil if the buffer matches,
@@ -6921,6 +6922,7 @@ CONDITION is either:
           (catch 'match
             (dolist (condition conditions)
               (when (cond
+                     ((eq condition t))
                      ((stringp condition)
                       (string-match-p condition (buffer-name buffer)))
                      ((functionp condition)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]