summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/init-external.el8
1 files changed, 8 insertions, 0 deletions
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)