From 8bd65bb90637d2a0e58b75bf4b6d8e7f1bb1c3e1 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 19 Jul 2013 18:53:10 -0400 Subject: advise recompile to not modify window state --- init/km-func.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'init/km-func.el') diff --git a/init/km-func.el b/init/km-func.el index 7228847..e588a86 100644 --- a/init/km-func.el +++ b/init/km-func.el @@ -122,3 +122,11 @@ KILLARG." (just-one-space)) (global-set-key (kbd "C-c k j") 'km/join-next-line-with-space) + +(defadvice recompile (around restore-windows) + "Prevent recompiling from spawning new windows" + (save-window-excursion + ad-do-it)) +(ad-activate 'recompile) + +(global-set-key (kbd "C-c g") 'recompile) -- cgit v1.2.3