all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: emacs-devel@gnu.org
Subject: Re: patch gud-gdb to respect other-frame-window?
Date: Sun, 29 Jul 2018 20:30:44 +0300	[thread overview]
Message-ID: <83fu02q797.fsf@gnu.org> (raw)
In-Reply-To: <86muuaq7m8.fsf@stephe-leake.org> (message from Stephen Leake on Sun, 29 Jul 2018 12:22:55 -0500)

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Date: Sun, 29 Jul 2018 12:22:55 -0500
> 
> 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?

Isn't there a more elegant way of doing this, without asking about a
feature explicitly?  Maybe other-frame-window needs some enhancement
to allow such protocols, otherwise we will need to test for each
similar feature by name, and that is both inelegant and a maintenance
burden, as both Emacs and those packages continue to evolve.

Thanks.



  reply	other threads:[~2018-07-29 17:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-29 17:22 patch gud-gdb to respect other-frame-window? Stephen Leake
2018-07-29 17:30 ` Eli Zaretskii [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fu02q797.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.