emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch gud-gdb to respect other-frame-window?


From: Stephen Leake
Subject: patch gud-gdb to respect other-frame-window?
Date: Sun, 29 Jul 2018 12:22:55 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)

Currently, 'gud-gdb' has its own notion of where to put the *gud-<exec name>*
buffer. Since I use other-frame-window (a GNU ELPA package), I'd like to
override that. This patch works for me:

diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 6826674a94..1b5cf46231 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2608,9 +2608,11 @@ gud-common-init
     (select-window
      (display-buffer
       (get-buffer-create (concat "*gud" filepart "*"))
-      '(display-buffer-reuse-window
-        display-buffer-in-previous-window
-        display-buffer-same-window display-buffer-pop-up-window)))
+      (if (featurep 'other-frame-window)
+          '(display-buffer-same-window)
+        '(display-buffer-reuse-window
+          display-buffer-in-previous-window
+          display-buffer-same-window display-buffer-pop-up-window))))
     (when (and existing-buffer (get-buffer-process existing-buffer))
       (error "This program is already being debugged"))
     ;; Set the dir, in case the buffer already existed with a different dir.

A similar pattern can be used for other commands that do not currently
respect other-frame-window.

Ok to commit to master?

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]