Subject: Re: bug#59730: gdb-mi.el: Local variables reordering

From: Eli Zaretskii <[email-masked]>
Date: Sat, 03 Dec 2022 21:58:41 +0200

> From: Gustaf Waldemarson <[email-masked]>
> Date: Thu, 1 Dec 2022 22:53:26 +0100
> Cc: [email-masked]
> 
> The updated patch is attached to this mail.

Thanks.  I have a couple of minor comments:

> +(defcustom gdb-locals-max-type-length 20
> +  "Maximum number of character to display in the local variables type column."
> +  :type 'integer
> +  :group 'gud
> +  :version "30.0")

This should be "30.1".  We don't release NN.o versions of Emacs.

> +(defcustom gdb-locals-max-name-length 20
> +  "Maximum number of character to display in the local variables name column."
> +  :type 'integer
> +  :group 'gud
> +  :version "30.0")

Likewise.

Also, please add more detailed description of what these options control.
The first line of the doc string is fine, but please add more text
explaining that this setting is for displaying the variables in the "Locals"
buffer.

> -          (propertize type 'font-lock-face font-lock-type-face)
> -          (propertize name 'font-lock-face font-lock-variable-name-face)
> +          (propertize (string-truncate-left name gdb-locals-max-name-length)
> +                      'font-lock-face font-lock-variable-name-face
> +                      'help-echo name)
> +          (propertize (string-truncate-left type gdb-locals-max-type-length)
> +                      'font-lock-face font-lock-type-face
> +                      'help-echo type)

I'm uncomfortable with backward-incompatible change in behavior for which
there's no way of getting the old behavior.  So please add another defcustom
that could be used to get the original order of type/name/value.

There also should be a NEWS entry about these new options, and the text
there should explain how to get back old behavior before these changes.