Subject: bug#54296: Add buffer-matching functionality

From: Dmitry Gutov <[email-masked]>
Date: Thu, 16 Jun 2022 03:47:15 +0300

On 15.06.2022 20:29, Eli Zaretskii wrote:
>> Date: Wed, 15 Jun 2022 19:51:42 +0300
>> Cc: [email-masked], [email-masked], [email-masked]
>> From: Dmitry Gutov <[email-masked]>
>>
>> On 15.06.2022 19:17, Eli Zaretskii wrote:
>>> Did you see that "was" part in what I wrote above?  I was only
>>> describing what I meant to say back then, that's all.
>>
>> Because your opinion made it into reality.
> 
> Sorry about that, but it was a misunderstanding of my opinion.
> 
>> Are you going to be fine with me changing 'buffer-match-p' to match the
>> older contract of 'project-kill-buffer-conditions', with both
>> 'major-mode' and 'derived-mode' matchers included?
> 
> I don't think I understand what you are suggesting.  What is that
> "older contract"? 

The value format that 'project-kill-buffer-conditions' supported before 
the recent change. You can look at its docstring and definition inside 
Emacs 28.1, for instance.

> Can you show a patch?

Please look at the patch attached to the very first message in this bug 
report.

https://debbugs.gnu.org/cgi/bugreport.cgi?att=1;bug=54296;msg=5;filename=0001-Generalise-buffer-matching-from-project.el.patch

The function name has changed after discussion, but the docstring is 
still relevant, and it mirrors 'project-kill-buffer-conditions'.