Subject: Re: bug#54296: Add buffer-matching functionality

From: Eli Zaretskii <[email-masked]>
Date: Mon, 13 Jun 2022 15:13:18 +0300

> Date: Mon, 13 Jun 2022 03:23:47 +0300
> Cc: [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> On 14.03.2022 05:21, Eli Zaretskii wrote:
> > I still don't think I understand why it is so
> > important that we should provide a special case for it.
> 
> It's pretty valuable to be able to provide a default value of 
> project-kill-buffer-conditions which can be read at a glance (including 
> in compiled Emacs) and easily edited via customize-variable by a user 
> with little to no knowledge of Elisp.
> 
> And 'major-mode' was used twice inside project-kill-buffer-conditions, 
> not just once.

I think I lost context, so please bear with me.

My "still don't think I understand" comment was about the need to
support major-mode when apparently the _only_ user of that is
fundamental-mode, where we cannot use derived-mode instead.  If indeed
fundamental-mode is the only case where major-mode is useful, I asked
why not use a predicate that tests explicitly for that case.

And if I understand your reasoning above, then doesn't

  (eq major-mode 'fundamental-mode)

provide an easy default that can be read at a glance?

Or what am I missing?