emacs-devel
[Top][All Lists]
Advanced

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

Re: The window-pub branch


From: grischka
Subject: Re: The window-pub branch
Date: Sat, 04 Dec 2010 19:10:58 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

I found out that hooking ediff to use just 'display-buffer is
actually easy via 'ediff-window-setup-function'.

Here is some code if you want to test your future version of
'display-buffer'.  It works quite well with a slightly improved
version of EWM for 'ediff-files'.

The wrapper calls two functions that you'd need to have:

    my-display-multi-buffers (list-of-buffers-and-labels)
    ;; display some buffers and return list of their windows

    my-select-window (window)
    ;; select 'window' and frame where it's on:

The stuff in the apply form is from ediff-setup-windows-plain-compare.
Don't ask me what it does.

(setq ediff-window-setup-function
      (lambda (A B C H) ;; buffers
        (apply (lambda (WA WB WC WH) ;; windows
                 (ediff-with-current-buffer control-buffer
                   (setq ediff-window-A WA
                         ediff-window-B WB
                         ediff-window-C WC
                         )
                   (when ediff-windows-job
                     (set-window-start WA
                       (ediff-overlay-start
                         (ediff-get-value-according-to-buffer-type
                           'A ediff-narrow-bounds)))
                     (set-window-start WB
                       (ediff-overlay-start
                         (ediff-get-value-according-to-buffer-type
                           'B ediff-narrow-bounds)))
                     ))
                 (my-select-window WH)
                 (ediff-setup-control-buffer control-buffer)
                 )
               (my-display-multi-buffers
                `((,A . ediff-A)
                  (,B . ediff-B)
                  (,C . ediff-C)
                  (,H . ediff-H)
                  ))
               )))




reply via email to

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