Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCH 4/5] gdb: remove some dead code from completer.c
Date: Tue, 16 Jan 2024 21:24:01 +0000	[thread overview]
Message-ID: <c1a29692e5e2129202447f3ac0addeee105ae0d6.1705439706.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1705439706.git.aburgess@redhat.com>

In completer.c there is some code that is surrounded with '#if 0',
this code:

  #if 0
    /* There is no way to do this just long enough to affect quote
       inserting without also affecting the next completion.  This
       should be fixed in readline.  FIXME.  */
    /* Ensure that readline does the right thing
       with respect to inserting quotes.  */
    rl_completer_word_break_characters = "";
  #endif

This code, in some form, and always defined out, has been around since
the original import of GDB.  Though the comment hints at what the
problem might be, it's not really clear what the issue is.  And
completion within GDB has moved on a long way since this code was
written ... but not used.

I'm proposing that we just remove this code.

If/when a problem comes up then we can look at how to solve it.  Maybe
this code would be the answer ... but also, I suspect, given all the
changes ... maybe not.  I'm not sure carrying around this code for
another 20+ years adds much value.

There should be no user visible changes after this commit.
---
 gdb/completer.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/gdb/completer.c b/gdb/completer.c
index 198d7893a6f..9c89aa43810 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -241,14 +241,6 @@ filename_completer (struct cmd_list_element *ignore,
       tracker.add_completion
 	(make_completion_match_str (std::move (p_rl), text, word));
     }
-#if 0
-  /* There is no way to do this just long enough to affect quote
-     inserting without also affecting the next completion.  This
-     should be fixed in readline.  FIXME.  */
-  /* Ensure that readline does the right thing
-     with respect to inserting quotes.  */
-  rl_completer_word_break_characters = "";
-#endif
 }
 
 /* The corresponding completer_handle_brkchars
-- 
2.25.4


  parent reply	other threads:[~2024-01-16 21:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 21:23 [PATCH 0/5] Cleanup and changes for file name completion Andrew Burgess
2024-01-16 21:23 ` [PATCH 1/5] gdb: remove skip_quoted and skip_quoted_chars Andrew Burgess
2024-01-16 21:23 ` [PATCH 2/5] gdb: fix bug where quote characters would become nullptr Andrew Burgess
2024-01-16 21:24 ` [PATCH 3/5] gdb: allow double quotes for quoting filenames Andrew Burgess
2024-01-16 21:24 ` Andrew Burgess [this message]
2024-01-16 21:24 ` [PATCH 5/5] gdb: remove special case completion word handling for filenames Andrew Burgess
2024-01-17 12:09   ` Eli Zaretskii
2024-01-17 16:29     ` Hannes Domani
2024-01-17 16:52       ` Eli Zaretskii
2024-01-18  9:33       ` Andrew Burgess
2024-03-06 10:23 ` [PATCHv2 0/7] Cleanup and changes for file name completion Andrew Burgess
2024-03-06 10:23   ` [PATCHv2 1/7] gdb: remove skip_quoted and skip_quoted_chars Andrew Burgess
2024-03-06 10:23   ` [PATCHv2 2/7] gdb: fix bug where quote characters would become nullptr Andrew Burgess
2024-03-06 10:23   ` [PATCHv2 3/7] gdb: allow double quotes for quoting filenames Andrew Burgess
2024-03-06 10:23   ` [PATCHv2 4/7] gdb: remove some dead code from completer.c Andrew Burgess
2024-03-06 10:23   ` [PATCHv2 5/7] gdb: remove special case completion word handling for filenames Andrew Burgess
2024-03-06 10:23   ` [PATCHv2 6/7] gdb/completion: make completion_find_completion_word static Andrew Burgess
2024-03-06 10:23   ` [PATCHv2 7/7] gdb: move more completion setup into completer.c Andrew Burgess
2024-03-25 18:30   ` [PATCHv2 0/7] Cleanup and changes for file name completion Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1a29692e5e2129202447f3ac0addeee105ae0d6.1705439706.git.aburgess@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox