]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove angle brackets from "apropos" text
authorTom Tromey <tromey@adacore.com>
Thu, 8 Jan 2026 15:12:10 +0000 (08:12 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 21 Jan 2026 20:43:40 +0000 (13:43 -0700)
I didn't notice during review, but the boxing patch introduced this
change:

-       styled_string (command_style.style (), "apropos word"));
+       styled_string (command_style.style (), "apropos <word>"));

GNU doesn't generally use the "<...>" convention, but instead uses
upper case for "metasyntactic variables".  See the GNU coding
standards for this topic.

In this particular spot, though, I think the old form using quotes is
preferable.  This patch reverts this change.

Reviewed-By: Tom de Vries <tdevries@suse.de>
gdb/testsuite/gdb.base/startup-hints.exp
gdb/top.c

index 2290a34eeaa986296394cd9be4262e09cdca402a..b2948df9798c15456ebf7999672f3201b3063433 100644 (file)
@@ -113,26 +113,26 @@ proc build_hint_re { width with_style } {
     if { $width > 66 || $width < 51 } {
        lappend msg \
            {{none {Type "}}
-            {command {apropos <word>}}
-            {none {" to search for commands related to <word>.}}}
-    } elseif { $width > 58 } {
+            {command {apropos word}}
+            {none "\" to search for commands related to \"word\"."}}
+    } elseif { $width > 56 } {
        lappend msg \
            {{none {Type "}}
-            {command {apropos <word>}}
+            {command {apropos word}}
             {none {" to search for commands related to}}} \
-           {{none {<word>.}}}
-    } elseif { $width > 55 } {
+           {{none {"word".}}}
+    } elseif { $width > 53 } {
        lappend msg \
            {{none {Type "}}
-            {command {apropos <word>}}
+            {command {apropos word}}
             {none {" to search for commands related}}}  \
-           {{none {to <word>.}}}
-    } elseif { $width > 47 } {
+           {{none {to "word".}}}
+    } else {
        lappend msg \
            {{none {Type "}}
-            {command {apropos <word>}}
+            {command {apropos word}}
             {none {" to search for commands}}} \
-           {{none {related to <word>.}}}
+           {{none {related to "word".}}}
     }
 
     if { $width > 50 } {
index e0ae0689c04f27e25c9c8d38d1871ded6f734298..54976032cd28c292270fd137d4a0de69ec97d00e 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1464,8 +1464,8 @@ print_gdb_hints (struct ui_file *stream)
   gdb_printf (&styled_msg[2], _("For help, type \"%ps\"."),
              styled_string (command_style.style (), "help"));
   gdb_printf (&styled_msg[3],
-             _("Type \"%ps\" to search for commands related to <word>."),
-             styled_string (command_style.style (), "apropos <word>"));
+             _("Type \"%ps\" to search for commands related to \"word\"."),
+             styled_string (command_style.style (), "apropos word"));
 
   /* If there isn't enough space to display the longest URL in a boxed
      style, then don't use the box, the terminal will break the output