diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-02-10 22:03:51 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-02-10 22:03:51 -0500 |
commit | 897405c94d70f257c93900f8b12a1108d6cb7cc4 (patch) | |
tree | 1a6998271fe686cb98f1ba23170097936076771e | |
parent | dd98aa76a04567626e066a6db86186b0ce211dfc (diff) | |
download | emacs.d-897405c94d70f257c93900f8b12a1108d6cb7cc4.tar.gz |
Restore window configuration after shell command
-rw-r--r-- | lisp/init-external.el | 8 |
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) |