bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffe


From: Eli Zaretskii
Subject: bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores)
Date: Thu, 16 Jul 2020 22:35:24 +0300

> From: "Philip K." <philip@warpmail.net>
> Cc: 42386@debbugs.gnu.org
> Date: Thu, 16 Jul 2020 20:16:40 +0200
> 
> > And why do you require a function not to be a symbol?  I'm probably
> > missing something.
> 
> My idea was to only allow lambda expressions, but that would make it
> hard to implement more complex predicates that should be defined in
> their own defuns.

Right, I don't think we should disallow named functions.

> How about this: Instead of symbols, adding a cons-cell:
> 
>     (major-mode . erc-mode)
> 
> prevents erc-buffers from being killed?

You are trying to separate modes from other functions?  Why?  Just see
if the major-mode's symbol is in the list, and if so, spare the
buffer.  Otherwise, if it's a function, call that function assuming
it's a predicate.  Does this present some problems?





reply via email to

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