From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22433 invoked by alias); 21 Sep 2003 21:43:26 -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 22423 invoked from network); 21 Sep 2003 21:43:25 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 21 Sep 2003 21:43:25 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id D9C38D2DAF; Sun, 21 Sep 2003 14:43:23 -0700 (PDT) Date: Sun, 21 Sep 2003 21:43:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Word break characters are language dependent Message-ID: <20030921214323.GE15984@gnat.com> References: <20030918191641.GY15984@gnat.com> <1438-Sun21Sep2003152844+0300-eliz@elta.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438-Sun21Sep2003152844+0300-eliz@elta.co.il> User-Agent: Mutt/1.4i X-SW-Source: 2003-09/txt/msg00450.txt.bz2 > > Unfortunately, the word-break characters for Ada are not exactly the > > same as the ones used by default. As a consequence, the current > > completer does not always find the correct starting location of the > > symbol name. So I think we should make them language-dependent by > > adding a new field to the language vector. > > Did you actually try to replace the hard-coded string with a different > one that is good for Ada, and see if that solves your problem? Yes :). What I actually did while waiting for the opinion of the maintainers and developpers was to make our Ada version of this string non-static, and changed gdb_get_completer_word_break_character() return the ada string if the current_language was ada. I then used that function in place of the string itself in the one location where I detected the problem. > So I think before we discuss the design of a possible solution, we > should be sure that it is in fact a solution ;-) Right! :-) That reminds me of a collegue in my previous job that often came to the chif software architect with grand designs, some of them almost extravagant. And this architect will always smile while asking the same question after the presentation: "Are you sure it works?". And this collegue would smile back and always say the same: "Yes, because I implemented it" :-). In this particular case, I didn't actually implement what I am suggesting. I just did a hack, a prototype if you like, that proves that it should work well. > Other than that, I think your general idea is correct and the proposed > direction is reasonable. Thanks for your input, it is much appreciated. I'll wait for another week to see if I can get more feedback, and then will try to work on a patch. -- Joel