[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46374: 28.0.50; Ask me to save buffers only if they are under caller
From: |
Juri Linkov |
Subject: |
bug#46374: 28.0.50; Ask me to save buffers only if they are under callers dir |
Date: |
Sun, 05 Sep 2021 19:21:34 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> Being able to set `save-some-buffers-root' as the value of
> `save-some-buffers-default-predicate' is easy for users.
>
> The problem I see is that it hides the real nature of
> `save-some-buffers-root':
> - it's not a predicate (as the docstring of
> `save-some-buffers-default-predicate' suggests).
> - it's a function generating the default predicate.
>
> We can make the distinction (default predicate <-> func generating a default
> predicate)
> more clear if we put the generating functions in a list.
>
> Then, we can restrict the allowed pred-fun to the elements inside such a list.
>
> I have played today with this quick-and-dirty patch:
> How do you think?
Nice idea, and it's better than what I proposed.
The only change that I suggest is instead of a list,
to put a special symbol on the symbol property,
for example:
(put 'save-some-buffers-root 'higher-order-function t)
or simply
(put 'save-some-buffers-root 'hof t)
A better name is appreciated.