[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40268: 27.0.60; [PATCH] Unify and improve gdb-mi source window displ
From: |
Yuan Fu |
Subject: |
bug#40268: 27.0.60; [PATCH] Unify and improve gdb-mi source window display |
Date: |
Sat, 4 Apr 2020 16:29:31 -0400 |
> On Mar 31, 2020, at 5:15 AM, martin rudalics <rudalics@gmx.at> wrote:
>
> > This one should be ok.
>
> Thanks. A few remarks. Please try to ident as
>
> (setq gdb-source-window-list
> (cl-remove-duplicates
> (cl-remove-if-not
> (lambda (win)
> (and (window-live-p win)
> (equal (window-frame win)
> (selected-frame))))
> gdb-source-window-list)
> :test #'equal))
>
> so we can safely change this later and easily stay within our line
> length limits. Also, tests like
>
> (equal (window-frame win)
> (selected-frame))))
>
> should use "eq" instead of "equal" and ones like
>
> ((member (selected-window) gdb-source-window-list)
> 'source)))
>
> "memq" instead of "member".
>
> Similarly to the above, writing
>
> (window
> (when buffer
> (if (eq gud-minor-mode 'gdbmi)
> (gdb-display-source-buffer buffer)
> ;; Gud still has the old behavior.
> (or (get-buffer-window buffer)
> (display-buffer buffer '(nil (inhibit-same-window . t)))))))
>
> permits us to stay within the 80 columns limit.
>
> Finally, instead of "Also, we simply the logic ..." I'd write "Also,
> simplify the logic ...". And please provide a NEWS entry.
>
> Thanks again for the work, Martin
Thanks for reviewing. Besides the changes you requested, I changed the last
condition in the cond form in `gdb-save-window-configuration’ to a catch-all
condition (to avoid weird problem when loading it back).
Yuan
source-window.patch
Description: Binary data
- bug#40268: 27.0.60; [PATCH] Unify and improve gdb-mi source window display,
Yuan Fu <=