unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* patch gud-gdb to respect other-frame-window?
@ 2018-07-29 17:22 Stephen Leake
  2018-07-29 17:30 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Stephen Leake @ 2018-07-29 17:22 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-07-31  9:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-29 17:22 patch gud-gdb to respect other-frame-window? Stephen Leake
2018-07-29 17:30 ` Eli Zaretskii
2018-07-30  6:56   ` Stephen Leake
2018-07-30  7:34     ` martin rudalics
2018-07-30 16:49       ` Stephen Leake
2018-07-31  6:37         ` martin rudalics
2018-07-31  9:21           ` [SPAM UNSURE] " Stephen Leake
2018-07-30  6:23 ` martin rudalics
2018-07-30 17:17 ` Stefan Monnier
2018-07-30 20:23   ` Stephen Leake
2018-07-30 20:28     ` Stefan Monnier
2018-07-30 20:30     ` Stephen Leake
2018-07-30 21:22       ` Stephen Leake

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).