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

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

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


From: Stefan Monnier
Subject: bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically
Date: Tue, 05 May 2009 21:41:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux)

> 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






reply via email to

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