Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Ingham <jingham@apple.com>
To: gdb-patches@sources.redhat.com
Subject: Re: complete command doesn't work for files...
Date: Thu, 25 Sep 2003 19:04:00 -0000	[thread overview]
Message-ID: <1A6E465C-EF8B-11D7-BEC8-00039379E320@apple.com> (raw)
In-Reply-To: <3F7228FE.7040908@redhat.com>

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


  reply	other threads:[~2003-09-25 19:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-24 23:14 Jim Ingham
2003-09-24 23:25 ` Joel Brobecker
2003-09-24 23:30   ` Andrew Cagney
2003-09-25 19:04     ` Jim Ingham [this message]
2003-09-25 19:41       ` Andrew Cagney
2003-09-27  4:36         ` Jim Blandy
2004-01-19 16:22 ` Daniel Jacobowitz
2004-01-20 22:19   ` Jim Ingham
2004-02-01  5:51     ` Daniel Jacobowitz

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=1A6E465C-EF8B-11D7-BEC8-00039379E320@apple.com \
    --to=jingham@apple.com \
    --cc=gdb-patches@sources.redhat.com \
    /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