Subject: bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically

From: Stefan Monnier <[email-masked]>
Date: Tue, 05 May 2009 21:41:41 -0400

> Unfortunately, this will create the following problem: Suppose a user
> wants to
> (1) always split the selected window instead of the largest or LRU one,
> (2) never split the selected window (as Drew points out in another
> thread), or
> (3) base her decision on whether a window shall be split on which window
> was selected at the time `display-buffer' was called.

Good call.

> + 	  (const :tag "sensibly" split-window-sensibly)
> + 	  (const :tag "vertically"
> + 		 (lambda (window)
> + 		   (when (window--splittable-p window)
> + 		     (with-selected-window window
> + 		       (split-window-vertically)))))
> + 	  (const :tag "horizontally"
> + 		 (lambda (window)
> + 		   (when (window--splittable-p window t)
> + 		     (with-selected-window window
> + 		       (split-window-horizontally)))))

I'd rather try to better advertise the use of (setq
split-width-threshold nil) and friends then bother with lambdas here or
defining new functions.

        Stefan