Mercurial > emacs
comparison lisp/ediff-wind.el @ 91040:14c4a6aac623
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 11 Oct 2007 16:14:00 +0000 |
parents | f55f9811f5d7 65663fcd2caa |
children | 880960b70474 |
comparison
equal
deleted
inserted
replaced
91039:eefadc1e1d5e | 91040:14c4a6aac623 |
---|---|
70 :prefix "ediff-" | 70 :prefix "ediff-" |
71 :group 'ediff | 71 :group 'ediff |
72 :group 'frames) | 72 :group 'frames) |
73 | 73 |
74 | 74 |
75 (defcustom ediff-window-setup-function (if (ediff-window-display-p) | 75 (defcustom ediff-window-setup-function 'ediff-setup-windows-automatic |
76 'ediff-setup-windows-multiframe | |
77 'ediff-setup-windows-plain) | |
78 "*Function called to set up windows. | 76 "*Function called to set up windows. |
79 Ediff provides a choice of two functions: `ediff-setup-windows-plain', for | 77 Ediff provides a choice of three functions: `ediff-setup-windows-plain', for |
80 doing everything in one frame, and `ediff-setup-windows-multiframe', | 78 doing everything in one frame, `ediff-setup-windows-multiframe', which sets |
81 which sets the control panel in a separate frame. Also, if the latter | 79 the control panel in a separate frame, and |
82 function detects that one of the buffers A/B is seen in some other frame, | 80 `ediff-setup-windows-automatic' (the default), which chooses an appropriate |
83 it will try to keep that buffer in that frame. | 81 behaviour based on the current window system. If the multiframe function |
82 detects that one of the buffers A/B is seen in some other frame, it will try | |
83 to keep that buffer in that frame. | |
84 | 84 |
85 If you don't like the two functions provided---write your own one. | 85 If you don't like the two functions provided---write your own one. |
86 The basic guidelines: | 86 The basic guidelines: |
87 1. It should leave the control buffer current and the control window | 87 1. It should leave the control buffer current and the control window |
88 selected. | 88 selected. |
92 3. It should accept the following arguments: | 92 3. It should accept the following arguments: |
93 buffer-A, buffer-B, buffer-C, control-buffer | 93 buffer-A, buffer-B, buffer-C, control-buffer |
94 Buffer C may not be used in jobs that compare only two buffers. | 94 Buffer C may not be used in jobs that compare only two buffers. |
95 If you plan to do something fancy, take a close look at how the two | 95 If you plan to do something fancy, take a close look at how the two |
96 provided functions are written." | 96 provided functions are written." |
97 :type '(choice (const :tag "Multi Frame" ediff-setup-windows-multiframe) | 97 :type '(choice (const :tag "Automatic" ediff-setup-windows-automatic) |
98 (const :tag "Multi Frame" ediff-setup-windows-multiframe) | |
98 (const :tag "Single Frame" ediff-setup-windows-plain) | 99 (const :tag "Single Frame" ediff-setup-windows-plain) |
99 (function :tag "Other function")) | 100 (function :tag "Other function")) |
100 :group 'ediff-window) | 101 :group 'ediff-window) |
101 | 102 |
102 ;; indicates if we are in a multiframe setup | 103 ;; indicates if we are in a multiframe setup |
332 (or (ediff-keep-window-config control-buffer) | 333 (or (ediff-keep-window-config control-buffer) |
333 (funcall | 334 (funcall |
334 (ediff-with-current-buffer control-buffer ediff-window-setup-function) | 335 (ediff-with-current-buffer control-buffer ediff-window-setup-function) |
335 buffer-A buffer-B buffer-C control-buffer)) | 336 buffer-A buffer-B buffer-C control-buffer)) |
336 (run-hooks 'ediff-after-setup-windows-hook)) | 337 (run-hooks 'ediff-after-setup-windows-hook)) |
338 | |
339 ;; Set up windows using the correct method based on the current window system. | |
340 (defun ediff-setup-windows-automatic (buffer-A buffer-B buffer-C control-buffer) | |
341 (if (ediff-window-display-p) | |
342 (ediff-setup-windows-multiframe buffer-A buffer-B buffer-C control-buffer) | |
343 (ediff-setup-windows-plain buffer-A buffer-B buffer-C control-buffer))) | |
337 | 344 |
338 ;; Just set up 3 windows. | 345 ;; Just set up 3 windows. |
339 ;; Usually used without windowing systems | 346 ;; Usually used without windowing systems |
340 ;; With windowing, we want to use dedicated frames. | 347 ;; With windowing, we want to use dedicated frames. |
341 (defun ediff-setup-windows-plain (buffer-A buffer-B buffer-C control-buffer) | 348 (defun ediff-setup-windows-plain (buffer-A buffer-B buffer-C control-buffer) |