From e48c2e5bf23439a671ced9423003faa49c1510ca Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 22 Jun 2018 17:54:20 +0100 Subject: [PATCH] el/dot-emacs.el: Prevent GUD-Gdb from making its windows be `dedicated'. Otherwise it's really hard to override its wrong decisions about where to put things. --- el/dot-emacs.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 86ba4d5..a75d95c 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -4106,6 +4106,19 @@ there is sadness." (add-hook 'find-file-hook 'mdw-try-smerge t) ;;;-------------------------------------------------------------------------- +;;; GUD, and especially GDB. + +;; Inhibit window dedication. I mean, seriously, wtf? +(defadvice gdb-display-buffer (after mdw-undedicated (buf) compile activate) + "Don't make windows dedicated. Seriously." + (set-window-dedicated-p ad-return-value nil)) +(defadvice gdb-set-window-buffer + (after mdw-undedicated (name &optional ignore-dedicated window) + compile activate) + "Don't make windows dedicated. Seriously." + (set-window-dedicated-p (or window (selected-window)) nil)) + +;;;-------------------------------------------------------------------------- ;;; MPC configuration. (eval-when-compile (trap (require 'mpc))) -- 2.11.0