]> git.eshelyaron.com Git - emacs.git/commit
Adapt ediff to nonstandard layouts
authorDaniel Colascione <dancol@dancol.org>
Fri, 21 Mar 2025 23:46:08 +0000 (19:46 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Mar 2025 19:22:50 +0000 (20:22 +0100)
commit28770ca212eba3c66957b12e31d6afbdbfb3aab2
tree91a31c74b31746ed9c19c742e9c6a647db949bd6
parent9834276e800f82e62cd5aace24b53621158b4a78
Adapt ediff to nonstandard layouts

Make ediff cope with having some of its windows (especially the control
window) not shown by a custom ediff-window-setup-function.
Modernize relevant adjacent code. After this change, one can write a
custom ediff-window-setup-function that doesn't show the control window.

* doc/misc/ediff.texi (Notes on Heavy-duty Customization): Refine
language to explain that the window setup function doesn't have to show
all windows.
* lisp/vc/ediff-util.el (ediff-select-control-window-on-setup):
New variable.
(ediff-setup, ediff-recenter, ediff-recenter-one-window)
(ediff-recenter-ancestor, ediff-toggle-read-only)
(ediff-operate-on-windows, ediff-jump-to-difference-at-point)
(ediff-default-suspend-function)
(ediff-clone-buffer-for-region-comparison)
(ediff-clone-buffer-for-window-comparison): Modernize control flow;
select only windows that exist.
* lisp/vc/ediff-wind.el (ediff-with-live-window): New convenience macro.
(ediff-window-setup-function): Explain relaxed contract.

(cherry picked from commit e5ee1d2a74c6a0989c863c3c6c06eba31efaecb3)
doc/misc/ediff.texi
lisp/vc/ediff-util.el
lisp/vc/ediff-wind.el