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: Eli Zaretskii
Subject: Re: patch gud-gdb to respect other-frame-window?
Date: Sun, 29 Jul 2018 20:30:44 +0300

> 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?  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 via email to

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