diff options
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 |