Is there a way for both
buffer-display-table to have effect at the same time?
The reason is, I'm using Pretty-Control-L (from Emacs Goodies El script package) and whitespace (of
whitespace.el, I think it is in the base Emacs distribution, but I’m not sure).
- Pretty-Control-L visualizes form-feeds (
^L) in a customized manner, by setting the entry for
C-lin the window-local
- Whitespace visualizes spaces, tabs and newlines by setting entries in the buffer-local
buffer-display-table. (and also by using
These uses clashes (or rather, the use of a
buffer-display-table clashes) since, if the
window-display-table is non-
nil it completely overrides any
buffer-display-table for any buffer displayed in that window.
Quote from the Emacs Lisp manual:
38.21.2 Active Display Table
Each window can specify a display table, and so can each buffer. When a buffer B is displayed in window W, display uses the display table for window W if it has one; otherwise, the display table for buffer B if it has one; otherwise, the standard display table if any. The display table chosen is called the "active" display table.
(emphasis by me)
So, Is there any easy way to consolidate this? Or is the only way to re-code one of them to use the same mechanism as the other?
I've been considering writing a small (i.e. even smaller) crude variant of the form-feed visualization compatible with the white-space visualization that just uses some buffer-loading hook (or other) to put a hard-coded entry for
^L in the
buffer-display-table. But I’d like to know if there’s any simpler alternative.