GNU bug report logs - #40268
27.0.60; [PATCH] Unify and improve gdb-mi source window display

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Sat, 28 Mar 2020 04:04:02 UTC

Severity: normal

Tags: patch

Found in version 27.0.60

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 40268 <at> debbugs.gnu.org
Subject: bug#40268: 27.0.60; [PATCH] Unify and improve gdb-mi source window display
Date: Tue, 31 Mar 2020 11:15:37 +0200
> 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




This bug report was last modified 5 years and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.