emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Customizing how windows are split by display-buffer


From: Fredrik Axelsson
Subject: Customizing how windows are split by display-buffer
Date: Mon, 19 Mar 2007 16:25:10 +0100

The function `display-buffer' sometimes splits a window with a call to
`split-window'. This split is always done vertically, i.e. the two windows are
above/below each other. I find it un-emacs like for this behaviour to be hard
coded and it doesn't suite everybody.

I propose to introduce the variable `prefer-window-split-horizontally' that can
be set to `t' to have `display-buffer' call `split-window' with it's `horflag'
parameter set to `t' instead of `nil'. The new variable can also be set to an
integer value that means that windows should be split horizontally but only if
the resulting windows are at least as wide as that value. I my self set the
value to 80 so that whenever the frame is wide enough to have two 80-column
windows side-by-side, display-buffer splits horizontally.

The attached patch defines the variable and modifies `display-buffer' in
src/window.c. It also adds the variable to lisp/cus-start.el.

I am new to posting patches and am happy for all kinds of feedback.

/Fredrik Axelsson

Attachment: prefer-window-split-horizontally.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]