Clément Pit-Claudel <cpitclaudel@gmail.com> schrieb am Do., 17. Mai 2018 um 16:28 Uhr:
On 2018-05-17 08:18, Shea Levy wrote:
> 2. How do we actually ensure the variables are propagated? I wrote the
>    inherit-local package to do the propagation, but there's no obvious
>    hook point to call it (thus the advice around generate-new-buffer)

We now have variable watchers:

> add-variable-watcher is a built-in function in ‘C source code’.
>
> (add-variable-watcher SYMBOL WATCH-FUNCTION)
>
> Cause WATCH-FUNCTION to be called when SYMBOL is set.
>
> It will be called with 4 arguments: (SYMBOL NEWVAL OPERATION WHERE).
> SYMBOL is the variable being changed.
> NEWVAL is the value it will be changed to.
> OPERATION is a symbol representing the kind of change, one of: ‘set’,
> ‘let’, ‘unlet’, ‘makunbound’, and ‘defvaralias’.
> WHERE is a buffer if the buffer-local value of the variable is being
> changed, nil otherwise.
>
> All writes to aliases of SYMBOL will call WATCH-FUNCTION too.

These could probably be used for that purpose:

No, they are only for debugging purposes.