]> git.eshelyaron.com Git - emacs.git/commitdiff
* subr.el (buffer-match-p): Add t as trivial a condition
authorPhilip Kaludercic <philipk@posteo.net>
Fri, 29 Jul 2022 11:54:47 +0000 (13:54 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Fri, 29 Jul 2022 16:04:18 +0000 (18:04 +0200)
lisp/subr.el

index 6b121a314a9b39b984c19fb405f1b748dddf3dea..9f7cb3ab6a987ab384c89c6f9e577888d2aaf119 100644 (file)
@@ -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)