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

[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, 10 Oct 2021 20:38:56 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

close 46374 28.0.60
thanks

>> 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.

I can't invent a better name than 'save-some-buffers-function'.
So now pushed with this property name.





reply via email to

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