summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-diff.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/km-diff.el b/lisp/km-diff.el
index 771cedf..b5d3c4b 100644
--- a/lisp/km-diff.el
+++ b/lisp/km-diff.el
@@ -56,5 +56,17 @@
(interactive)
(km/diff--with-other-window #'ediff))
+(defvar km/ediff-previous-window-config nil)
+
+;;;###autoload
+(defun km/ediff-save-window-config ()
+ (setq km/ediff-previous-window-config (current-window-configuration)))
+
+;;;###autoload
+(defun km/ediff-restore-window-config ()
+ (when km/ediff-previous-window-config
+ (set-window-configuration km/ediff-previous-window-config)
+ (setq km/ediff-previous-window-config nil)))
+
(provide 'km-diff)
;;; km-diff.el ends here