From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: patch gud-gdb to respect other-frame-window?
Date: Mon, 30 Jul 2018 01:56:26 -0500 [thread overview]
Message-ID: <86in4xqkit.fsf@stephe-leake.org> (raw)
In-Reply-To: <83fu02q797.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 29 Jul 2018 20:30:44 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> 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?
Never mind; I realized I can set 'display-buffer-overriding-action' to
'display-buffer-same-window in my ~/.emacs; that overrides this code,
and still lets other-frame-window do its thing. So this patch, and
others like it, it unecessary.
I'll add this to the documentation in other-frame-window.
--
-- Stephe
next prev parent reply other threads:[~2018-07-30 6:56 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
2018-07-30 6:56 ` Stephen Leake [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86in4xqkit.fsf@stephe-leake.org \
--to=stephen_leake@stephe-leake.org \
--cc=emacs-devel@gnu.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 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).