[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62417: ; Regression: 59ecf25fc860 is the first bad commit
From: |
João Távora |
Subject: |
bug#62417: ; Regression: 59ecf25fc860 is the first bad commit |
Date: |
Sun, 26 Mar 2023 21:22:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: João Távora <joaotavora@gmail.com>
>> Date: Sat, 25 Mar 2023 13:56:40 +0000
>> Cc: "Philip K." <philipk@posteo.net>, 62417@debbugs.gnu.org
>>
>> But you're confused: this is not about buffer-match-p's arguments. It's
>> about the arguments to the function
>> that you may also pass to buffer-match-p in it's first CONDITION argument.
>> Use my simple recipe in both
>> Emacs 28 and 29.
>
> The function should be called with the same BUFFER-OR-NAME argument
> with which buffer-match-p was called.
Here's your idea in a patch. It fixes the issue. Propose this be
pushed to emacs-29.
João
diff --git a/lisp/subr.el b/lisp/subr.el
index 99ddd813867..39866dd7acb 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -7114,7 +7114,7 @@ buffer-match-p
- the symbol t, to always match,
- the symbol nil, which never matches,
- a regular expression, to match a buffer name,
-- a predicate function that takes a buffer object and ARG as
+- a predicate function that takes BUFFER-OR-NAME and ARG as
arguments, and returns non-nil if the buffer matches,
- a cons-cell, where the car describes how to interpret the cdr.
The car can be one of the following:
@@ -7140,8 +7140,8 @@ buffer-match-p
(string-match-p condition (buffer-name buffer)))
((pred functionp)
(if (eq 1 (cdr (func-arity condition)))
- (funcall condition buffer)
- (funcall condition buffer arg)))
+ (funcall condition buffer-or-name)
+ (funcall condition buffer-or-name arg)))
(`(major-mode . ,mode)
(eq
(buffer-local-value 'major-mode buffer)
diff --git a/lisp/window.el b/lisp/window.el
index 08ce8498655..e8daa0383ec 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7510,8 +7510,8 @@ display-buffer-alist
If non-nil, this is an alist of elements (CONDITION . ACTION),
where:
- CONDITION is passed to `buffer-match-p', along with the buffer
- that is to be displayed and the ACTION argument of
+ CONDITION is passed to `buffer-match-p', along with the name of
+ the buffer that is to be displayed and the ACTION argument of
`display-buffer', to check if ACTION should be used.
ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an
- bug#62417: 30.0.50; Regression: 59ecf25fc860 is the first bad commit, (continued)
- bug#62417: 30.0.50; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/24
- bug#62417: 30.0.50; Regression: 59ecf25fc860 is the first bad commit, Philip Kaludercic, 2023/03/24
- bug#62417: 30.0.50; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/24
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/24
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/25
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/25
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/25
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/25
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/25
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/25
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit,
João Távora <=
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Philip Kaludercic, 2023/03/26
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/26
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/27
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/27
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/27
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/27
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/27
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, João Távora, 2023/03/27
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Eli Zaretskii, 2023/03/27
- bug#62417: ; Regression: 59ecf25fc860 is the first bad commit, Philip Kaludercic, 2023/03/27