summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <meyerkya@gmail.com>2013-07-19 18:53:10 -0400
committerKyle Meyer <meyerkya@gmail.com>2013-07-19 18:53:10 -0400
commit8bd65bb90637d2a0e58b75bf4b6d8e7f1bb1c3e1 (patch)
tree6bc61514592e4619628b6db7feecdc071897d03e
parent025f5f02180a80f7f36494f8a670755425f8eb32 (diff)
downloademacs.d-8bd65bb90637d2a0e58b75bf4b6d8e7f1bb1c3e1.tar.gz
advise recompile to not modify window state
-rw-r--r--init/km-func.el8
1 files changed, 8 insertions, 0 deletions
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)