From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19174 invoked by alias); 25 Sep 2003 19:04:32 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19165 invoked from network); 25 Sep 2003 19:04:32 -0000 Received: from unknown (HELO mail-out3.apple.com) (17.254.13.22) by sources.redhat.com with SMTP; 25 Sep 2003 19:04:32 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out3.apple.com (8.12.10/8.12.9) with ESMTP id h8PJ4Vmj017047 for ; Thu, 25 Sep 2003 12:04:31 -0700 (PDT) Received: from scv2.apple.com (scv2.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Thu, 25 Sep 2003 12:04:03 -0700 Received: from [17.201.22.240] (inghji.apple.com [17.201.22.240]) by scv2.apple.com (8.12.9/8.12.9) with ESMTP id h8PJ4LWI024515 for ; Thu, 25 Sep 2003 12:04:21 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v605) In-Reply-To: <3F7228FE.7040908@redhat.com> References: <20030924232504.GL1020@gnat.com> <3F7228FE.7040908@redhat.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <1A6E465C-EF8B-11D7-BEC8-00039379E320@apple.com> Content-Transfer-Encoding: 7bit From: Jim Ingham Subject: Re: complete command doesn't work for files... Date: Thu, 25 Sep 2003 19:04:00 -0000 To: gdb-patches@sources.redhat.com X-SW-Source: 2003-09/txt/msg00570.txt.bz2 Comments in code should not say why what is no longer in the code was incorrect... That is just confusing. So the text of the ChangeLog is not appropriate as a comment in the code. But I have no problem adding a comment here. Something like: if (c->completer == filename_completer) { /* See the commentary above about the specifics of file-name completion. Here we start from the cursor and work backwards to get the last filename in the current word. */ for (p = tmp_command + point - 1; p > tmp_command && strchr (gdb_completer_file_name_break_characters, p[-1]) == NULL; p--) ; Jim On Sep 24, 2003, at 4:30 PM, Andrew Cagney wrote: >> Jim, >> I don't have any authority on the patch itself, but I do think that >> it would be really worth to directly insert inside the code the text >> of your changelog entry. I find it easier to find the relevant >> information when it's inside the code, as opposed to inside the >> ChangeLog. > > Joel, yes, that's correct pratice. ChangeLog contains what changed. > The actual file should change why. > > Andrew > > >>> * completer.c (complete_line): For filename completions, when >>> you look for >>> the last word before the cursor, actually start from the >>> cursor & work backwards, >>> rather than starting from the word you were handed. Starting >>> from the >>> word doesn't work if the input contains more than one word - >>> as it does >>> in the complete command. > > > -- Jim Ingham jingham@apple.com Developer Tools Apple Computer