diff options
| author | Tino Calancha | 2017-03-14 16:12:29 +0900 |
|---|---|---|
| committer | Tino Calancha | 2017-03-14 16:12:29 +0900 |
| commit | 0f3d1b782353fd1fc0ab5f89d47d9e790f44e6b2 (patch) | |
| tree | 0f9e4ae51b5bb2aaddc5f38d51c5e25a1bab78d6 /doc | |
| parent | e39d593475300ff388cdb69c8134ad513e9310e7 (diff) | |
| download | emacs-0f3d1b782353fd1fc0ab5f89d47d9e790f44e6b2.tar.gz emacs-0f3d1b782353fd1fc0ab5f89d47d9e790f44e6b2.zip | |
Show ancestor buffer in 3way merges
Add an option ediff-show-ancestor', to control if the ancestor buffer
must be shown in 3way merges (Bug#25493); set it non-nil by default.
Add a toggle to change this option interactively; the original
value of the option is restored on exit.
Update the window setup so that the ancestor buffer is
shown in 3way merges when ediff-show-ancestor is non-nil.
Any operation on ediff windows must take in account the
ancestor window as well, when this is shown.
* lisp/vc/ediff-init.el (ediff-show-ancestor): New option.
(ediff--show-ancestor-orig): New defvar.
* lisp/vc/ediff-wind.el (ediff-window-Ancestor): New defvar.
(ediff-setup-windows-plain-merge, ediff-setup-windows-multiframe-merge):
Display ancestor buffer if ediff-show-ancestor is non-nil.
(ediff-keep-window-config): Expect ancestor window in
ediff-window-config-saved.
(ediff-window-alist): Add entry for the ancestor window.
* lisp/vc/ediff-util.el (ediff-setup-control-buffer):
ediff-window-config-saved contains ancestor window.
(ediff-show-ancestor): Delete this command.
(ediff-setup-keymap): Bind ediff-toggle-show-ancestor to '/' for merge jobs.
(ediff-update-diffs): Compute new diffs using ancestor buffer in 3way merges;
don't cheat it to think that is performing a comparison, that trick is not
necessary anymore: simply call 'ediff-setup-diff-regions-function'
with file-A, file-B and the file ancestor.
(ediff-recenter): Update doc string. Consider the ancestor buffer.
(ediff--check-ancestor-exists): New defun.
(ediff-toggle-show-ancestor): New command; toggle ediff-show-ancestor.
(ediff--restore-options-on-exit): Restore ediff-show-ancestor on exit.
(ediff-scroll-vertically, ediff-scroll-horizontally)
(ediff-operate-on-windows): Consider the ancestor as well.
* lisp/vc/ediff-help.el (ediff-long-help-message-merge):
List ediff-toggle-show-ancestor.
* doc/misc/ediff.texi (Introduction, Quick Help Commands): Update manual.
; * etc/NEWS: Announce these changes.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/ediff.texi | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 19b7adbd668..87d3dfd6ed9 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi | |||
| @@ -99,7 +99,8 @@ through them. You can also copy difference regions from one buffer to | |||
| 99 | another (and recover old differences if you change your mind). | 99 | another (and recover old differences if you change your mind). |
| 100 | 100 | ||
| 101 | Another powerful feature is the ability to merge a pair of files into a | 101 | Another powerful feature is the ability to merge a pair of files into a |
| 102 | third buffer. Merging with an ancestor file is also supported. | 102 | third buffer. Merging with an ancestor file, (a.k.a. 3way merges) |
| 103 | is also supported. | ||
| 103 | Furthermore, Ediff is equipped with directory-level capabilities that | 104 | Furthermore, Ediff is equipped with directory-level capabilities that |
| 104 | allow the user to conveniently launch browsing or merging sessions on | 105 | allow the user to conveniently launch browsing or merging sessions on |
| 105 | groups of files in two (or three) different directories. | 106 | groups of files in two (or three) different directories. |
| @@ -828,7 +829,10 @@ region in buffer A, etc. | |||
| 828 | 829 | ||
| 829 | @item / | 830 | @item / |
| 830 | @kindex / | 831 | @kindex / |
| 831 | Displays the ancestor file during merges. | 832 | @vindex ediff-show-ancestor |
| 833 | Toggle to display the ancestor file in 3way merges. | ||
| 834 | You can enable permanently this setting customizing the variable | ||
| 835 | @code{ediff-show-ancestor}. | ||
| 832 | @item & | 836 | @item & |
| 833 | @kindex & | 837 | @kindex & |
| 834 | In some situations, such as when one of the files agrees with the ancestor file | 838 | In some situations, such as when one of the files agrees with the ancestor file |