[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On removing some obsolete code from subr and core
From: |
Stefan Monnier |
Subject: |
Re: On removing some obsolete code from subr and core |
Date: |
Mon, 07 Nov 2016 15:31:08 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> you or someone else know better why the default-FOO variables might be
> needed again,
The only reason would be backward compatibility.
> or why they were implemented in the first place.
I'm pretty sure it's for historical reasons. I don't know those
reasons, tho. My guess goes as follows:
- First there were normal vars, and buffer-local vars
(e.g. buffer-file-name, major-mode).
- The two sets were disjoint.
- There was no `default-value' nor `set-default'.
- For those buffer-local vars where a default value was needed/made
sense, a separate variable was introduced with the convention to name
it `default-FOO'.
Later on appeared `default-value`, `make-local-variable`,
`make-variable-buffer-local`, ... which blurred the line between those
two disjoint sets of variables, at which point the `default-FOO' vars
became redundant but they were kept for backward compatibility reasons
(also it's occasionally handy to let-bind `default-FOO', while doing the
same for (default-value 'FOO) requires something like `cl-letf').
Stefan
- Re: On removing some obsolete code from subr and core, (continued)
Re: On removing some obsolete code from subr and core, Mark Oteiza, 2016/11/06
- Re: On removing some obsolete code from subr and core, Eli Zaretskii, 2016/11/06
- Re: On removing some obsolete code from subr and core, Mark Oteiza, 2016/11/06
- Re: On removing some obsolete code from subr and core, Eli Zaretskii, 2016/11/07
- Re: On removing some obsolete code from subr and core, Mark Oteiza, 2016/11/07
- Re: On removing some obsolete code from subr and core, Eli Zaretskii, 2016/11/07
- Re: On removing some obsolete code from subr and core, Mark Oteiza, 2016/11/07
- Re: On removing some obsolete code from subr and core, Noam Postavsky, 2016/11/08
Re: On removing some obsolete code from subr and core,
Stefan Monnier <=
Re: On removing some obsolete code from subr and core, Johan Bockgård, 2016/11/07
Re: On removing some obsolete code from subr and core, Stefan Monnier, 2016/11/08
Re: On removing some obsolete code from subr and core, John Wiegley, 2016/11/08
Re: On removing some obsolete code from subr and core, Clément Pit--Claudel, 2016/11/05
Re: On removing some obsolete code from subr and core, Clément Pit--Claudel, 2016/11/05
Re: On removing some obsolete code from subr and core, Clément Pit--Claudel, 2016/11/05