diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-06-14 23:09:03 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-06-14 23:09:03 -0400 |
commit | 6acc970159578c95c94762f2a185aa2d4891ba40 (patch) | |
tree | e2aeb67ca76d71d6610c7a7f64671f4aa89f75e4 /lisp | |
parent | 863552cdd9aadebd89ed9334a31daa54092d8068 (diff) | |
download | emacs.d-6acc970159578c95c94762f2a185aa2d4891ba40.tar.gz |
Stop compile from making duplicate buffers
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-external.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/init-external.el b/lisp/init-external.el index 115c060..8e0f3db 100644 --- a/lisp/init-external.el +++ b/lisp/init-external.el @@ -48,6 +48,15 @@ is non-nil." ;;; Compilation +(defadvice compile (around prevent-duplicate-compilation-windows activate) + "Pop to compilation buffer only if it isn't visible. +This is useful for using multiple frames (e.g., with a two +monitor setup)." + (if (get-buffer-window "*compilation*" 'visible) + (save-window-excursion + ad-do-it) + ad-do-it)) + (defadvice recompile (around prevent-window-on-compilation activate) "Prevent recompiling from spawning new windows." (save-window-excursion |