summaryrefslogtreecommitdiff
path: root/lisp/init-external.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-02-10 22:03:51 -0500
committerKyle Meyer <kyle@kyleam.com>2014-02-10 22:03:51 -0500
commit897405c94d70f257c93900f8b12a1108d6cb7cc4 (patch)
tree1a6998271fe686cb98f1ba23170097936076771e /lisp/init-external.el
parentdd98aa76a04567626e066a6db86186b0ce211dfc (diff)
downloademacs.d-897405c94d70f257c93900f8b12a1108d6cb7cc4.tar.gz
Restore window configuration after shell command
Diffstat (limited to 'lisp/init-external.el')
-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)