[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25493: 26.0.50; ediff merge should (optionally) show ancestor in fou
bug#25493: 26.0.50; ediff merge should (optionally) show ancestor in fourth window
Tue, 14 Mar 2017 16:43:38 +0900
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>> Subject: [PATCH 2/2] 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.
> Extra space there.
>> - ;; In case of merge job, fool it into thinking that it is just doing
>> - ;; comparison
>> - (let ((ediff-setup-diff-regions-function
>> - (ediff-3way-comparison-job ediff-3way-comparison-job)
>> - (ediff-merge-job ediff-merge-job)
>> - (ediff-merge-with-ancestor-job ediff-merge-with-ancestor-job)
>> - (ediff-job-name ediff-job-name))
>> - (if ediff-merge-job
>> - (setq ediff-setup-diff-regions-function 'ediff-setup-diff-regions3
>> - ediff-3way-comparison-job t
>> - ediff-merge-job nil
>> - ediff-merge-with-ancestor-job nil
>> - ediff-job-name 'ediff-files3))
>> - (funcall ediff-setup-diff-regions-function file-A file-B file-C))
>> + (funcall ediff-setup-diff-regions-function file-A file-B
>> + (if ediff-merge-with-ancestor-job file-Ancestor file-C))
> It works when I tested it, so I guess this is correct, but it's not
> really obvious to me why (i.e., why we no longer need to "fool it").
> Could you add an explanation to the commit message?
Now I mention that this trick is not necessary. Before the patch there
were several parts of the code executed only if
`ediff-3way-comparison-job' was non-nil. After the patch, those parts
of the code also test if `ediff-merge-with-ancestor-job' is non-nil;
that's why we don't need to fool it anymore.
> Otherwise looks good to me.
Pushed to master as commit 0f3d1b782353fd1fc0ab5f89d47d9e790f44e6b2