[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Change in files.el
From: |
Stefan Monnier |
Subject: |
Re: Change in files.el |
Date: |
Sat, 28 Jan 2017 09:40:11 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>> > +(defcustom save-some-buffers-default-predicate nil
>> > + "Default predicate for `save-some-buffers'.
>> > +This allows you to stop `save-some-buffers' from asking
>> > +about certain files that you'd usually rather not save."
>> Please make it so that the var *always* has a function value.
> Why is that important?
- So that you don't have to wrap each and every use inside an `if'.
- Or so you don't have to fix the docstring to say what happens when the
value is nil.
- Or so you can use `add-function' on it.
- More generally, so that you can slightly change its behavior without
having to re-implement the default behavior by hand.
- Also, so as to make sure that it is *possible* to reimplement the
default behavior by hand (i.e. to make sure the predicate has access to all
the info it needs to reproduce the default behavior).
This is a rule we should try to follow for all *-function and
*-predicate variables (as well as similar cases, such as
process-filters and sentinels).
Stefan
- Change in files.el, Richard Stallman, 2017/01/27
- Re: Change in files.el, Stefan Monnier, 2017/01/27
- Re: Change in files.el, Eli Zaretskii, 2017/01/28
- Re: Change in files.el, Stefan Monnier, 2017/01/28
- Re: Change in files.el, Eli Zaretskii, 2017/01/28
- Re: Change in files.el, Stefan Monnier, 2017/01/28
- Re: Change in files.el, Eli Zaretskii, 2017/01/28
- Re: Change in files.el, Stefan Monnier, 2017/01/28
- Re: Change in files.el, Eli Zaretskii, 2017/01/28
- Re: Change in files.el, Stefan Monnier, 2017/01/28