3 Commits (d314fe16f72fc758639c83848a16e4d2ed7efa9e)

Author SHA1 Message Date
John Turner d314fe16f7
created display-buffer-in-side-window wrapper function
The old display-buffer-alist thing did not work like I expected it to,
so we removed it.

Instead of trying to update display-buffer-alist
when the screen resizes via a hook, we just create our own display function that
can be used in display-buffer-alist directly. The function takes a
"which-side" property in the alist, the property holds a function that returns
which side the new buffer will snap to when invoked. The display
function then creates a new alist with the side property and any other
properties were passed in, and calls display-buffer-in-side-window
with the new alist.

This allows us to use this function as if it were
display-buffer-in-side-window, but with an extra property to decide
which side the window snaps to each time the function is invoked. This
is useful if you want side windows to snap to different parts of the
screen based on the current size of the frame, or anything else.
2 years ago
John Turner 8a028d54dd
removed display-buffer-alist update function
Before we had a function that updated display-buffer-alist whenever
the frame's size was changed, so that info windows like flymake or
flycheck open would snap to either the bottom or right hand side of the
frame depending on whether the window manager had the frame squeezed
vertically (like when you have two windows side by side split
vertically).

Now instead of having that function run every time the frame resizes,
we just make the 'side property a function that should get evaluated
each time the property is read. The function returns either 'bottom or
'right depending on the frame's current size in pixels.
2 years ago
John Turner e6b5e17a39
init 2 years ago