From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id CB4DC3858404; Mon, 25 Mar 2024 18:29:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB4DC3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711391394; bh=RzNxiOjU6W1SIobCOLBwTFxsm+FBV04R1TBqwHK6p9U=; h=From:To:Subject:Date:From; b=CYxoLLvGqF9vRAV4XLAsaIIO3ohlhKPwSvDUrU7+yvo+pyyZzE6NDUkxA7au5N0ef XGlrrBL1VH9Dosa6O8Sigkv0O0rHg+0IIFSQVuSFt+oiCJxxWGg0B67ygMGwgGuq8F d3flYxckUuSISh4FVXEeVv5b+UNxHx9vWs9iQ7yk= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: remove some dead code from completer.c X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: 4f440ff33d1cf8812d4f652f6fddbfa3d117268e X-Git-Newrev: c8adaf3dd31e154afc6577d93ea3db675c11eb97 Message-Id: <20240325182954.CB4DC3858404@sourceware.org> Date: Mon, 25 Mar 2024 18:29:54 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc8adaf3dd31e= 154afc6577d93ea3db675c11eb97 commit c8adaf3dd31e154afc6577d93ea3db675c11eb97 Author: Andrew Burgess Date: Tue Jan 16 16:08:12 2024 +0000 gdb: remove some dead code from completer.c =20 In completer.c there is some code that is surrounded with '#if 0', this code: =20 #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 =3D ""; #endif =20 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. =20 I'm proposing that we just remove this code. =20 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. =20 There should be no user visible changes after this commit. Diff: --- gdb/completer.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gdb/completer.c b/gdb/completer.c index cefac605a33..330c39598c5 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 =3D ""; -#endif } =20 /* The corresponding completer_handle_brkchars