emacs-devel
[Top][All Lists]
Advanced

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

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


From: Stephen Leake
Subject: Re: patch gud-gdb to respect other-frame-window?
Date: Mon, 30 Jul 2018 01:56:26 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>> From: Stephen Leake <address@hidden>
>> 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



reply via email to

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