emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-commit] emacs/src window.c


From: Juri Linkov
Subject: Re: [Emacs-commit] emacs/src window.c
Date: Sun, 09 Sep 2007 02:07:34 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> Eli Zaretskii <address@hidden> writes:
>
>> Modified files:
>>      src            : window.c
>
>> Log message:
>>      (prefer_window_split_horizontally): New variable.
>>      (display_buffer): Consider splitting window horizontally depending on
>>      prefer_window_split_horizontally.
>
> Unless I'm mistaken there was no need to install this, Stefan already
> implemented this feature via `split-window-preferred-function'.

Yes, and Stefan's implementation is superior.

It allows specifying such a preference as splitting windows horizontally
when there are enough horizontal space for two side-by-side windows
(I think this should be added as a new choice to the new variable):

(setq split-window-preferred-function
      (lambda (window)
        (split-window window nil (if (> (frame-width) 160) 'horiz))))

It even allows implementing functionality I missed in Emacs for a long time!
After setting it to the following value:

(setq split-window-preferred-function
      (lambda (window)
        (if (member (buffer-name (window-buffer window))
                    '("*Help*"))
            (selected-window)
          (split-window window nil 'horiz))))

it visits source files from the *Help* buffer in the same window.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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