[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: split-window-preferred-function
From: |
Juri Linkov |
Subject: |
Re: split-window-preferred-function |
Date: |
Sat, 29 Mar 2008 02:45:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) |
> Wouldn't it be nicer to use something like
>
> (or (get-lru-window nil nil)
> ;; Try visible frames first.
> (get-buffer-window (current-buffer) 'visible)
> (get-largest-window 'visible)
> ;; If that didn't work, try iconified frames.
> (get-buffer-window (current-buffer) 0)
> (get-largest-window 0)
> ;; As a last resort, make a new frame.
> (frame-selected-window (funcall pop-up-frame-function)))
>
> at the end of `split-window-preferred-horizontally'?
Of course, I already noticed that this part is eligible for optimization
in one `or', but I decided to try writing a close equivalent of
C code in Lisp, so it would be easier to put both versions side-by-side
(in horizontally split windows ;-) and compare their logics. And I wrote
about this fact in the docstring as:
This function tries to match the implementation of vertical splitting
in `display-buffer' as close as possible but with the logic of
horizontal splitting.
Not a big deal, I think.
--
Juri Linkov
http://www.jurta.org/emacs/
- split-window-preferred-function, martin rudalics, 2008/03/19
- Re: split-window-preferred-function, Juri Linkov, 2008/03/20
- Re: split-window-preferred-function, Stefan Monnier, 2008/03/20
- Re: split-window-preferred-function, Juri Linkov, 2008/03/21
- Re: split-window-preferred-function, Stefan Monnier, 2008/03/22
- Re: split-window-preferred-function, Juri Linkov, 2008/03/22
- Re: split-window-preferred-function, Juri Linkov, 2008/03/27
- Re: split-window-preferred-function, martin rudalics, 2008/03/28
- Re: split-window-preferred-function,
Juri Linkov <=
- Re: split-window-preferred-function, martin rudalics, 2008/03/29
- Re: split-window-preferred-function, Juri Linkov, 2008/03/29
- Re: split-window-preferred-function, martin rudalics, 2008/03/29
- Re: split-window-preferred-function, Stefan Monnier, 2008/03/29
- Re: split-window-preferred-function, Richard Stallman, 2008/03/30
Re: split-window-preferred-function, martin rudalics, 2008/03/21