From 897405c94d70f257c93900f8b12a1108d6cb7cc4 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 10 Feb 2014 22:03:51 -0500 Subject: Restore window configuration after shell command --- lisp/init-external.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') diff --git a/lisp/init-external.el b/lisp/init-external.el index a7dfc1e..b18cd0e 100644 --- a/lisp/init-external.el +++ b/lisp/init-external.el @@ -17,6 +17,14 @@ (save-window-excursion ad-do-it)) +(defadvice shell-command (around shell-command-restore-windows activate) + "Restore window configuraiton after shell-command. +The hides the *Async Shell Command* buffer that is opened in the +other window when an asynchronous command is run." + (window-configuration-to-register :before-shell-command) + ad-do-it + (jump-to-register :before-shell-command)) + (global-set-key (kbd "C-c g") 'recompile) (provide 'init-external) -- cgit v1.2.3