[binutils-gdb] Remove angle brackets from "apropos" text

Tom Tromey tromey@sourceware.org
Wed Jan 21 20:58:33 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d24d8ae680acdc2117432b58eaf00c2f57e0254c

commit d24d8ae680acdc2117432b58eaf00c2f57e0254c
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Jan 8 08:12:10 2026 -0700

    Remove angle brackets from "apropos" text
    
    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>

Diff:
---
 gdb/testsuite/gdb.base/startup-hints.exp | 22 +++++++++++-----------
 gdb/top.c                                |  4 ++--
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gdb/testsuite/gdb.base/startup-hints.exp b/gdb/testsuite/gdb.base/startup-hints.exp
index 2290a34eeaa..b2948df9798 100644
--- a/gdb/testsuite/gdb.base/startup-hints.exp
+++ b/gdb/testsuite/gdb.base/startup-hints.exp
@@ -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 } {
diff --git a/gdb/top.c b/gdb/top.c
index e0ae0689c04..54976032cd2 100644
--- 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


More information about the Gdb-cvs mailing list