X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/241c3eca2108c1c5b6b36cf4bf85651a7352f52d..6938850a823e3c0df2c62e9ce3eaf55a4fd133c8:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index a74b693..26cfb63 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -2248,6 +2248,18 @@ doesn't match any of the regular expressions in (add-hook 'post-command-hook 'mdw-update-terminal-title) ;;;-------------------------------------------------------------------------- +;;; Ediff hacking. + +(defvar mdw-ediff-previous-windows) +(defun mdw-ediff-setup () + (setq mdw-ediff-previous-windows (current-window-configuration))) +(defun mdw-ediff-suspend-or-quit () + (set-window-configuration mdw-ediff-previous-windows)) +(add-hook 'ediff-before-setup-hook 'mdw-ediff-setup) +(add-hook 'ediff-quit-hook 'mdw-ediff-suspend-or-quit t) +(add-hook 'ediff-suspend-hook 'mdw-ediff-suspend-or-quit t) + +;;;-------------------------------------------------------------------------- ;;; C programming configuration. ;; Make C indentation nice.