I am developing a feature to adapt a mode-line to the width of the window. I have developped it so far using buffer-local variables to store the state of the mode-line, however, when I open the same buffer in several windows they all share the same mode-line state even if they have different window widths.
To solve that I would need window-local variables instead of buffer-local, but it seems that Emacs only provides make-variable-buffer-local
and make-variable-frame-local
.
- Is there a way of emulating window-local variables for my use-case ?
- Is there any thread in Emacs developpers mailing lists discussing this issue ?
- More specifically, would Emacs maintainers be opened to this being implemented ?
make-variable-frame-local
is marked obsolete and will be removed in the next version of Emacs; the documentation encourages use of frame parameters instead.