From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7258 invoked by alias); 24 Jan 2006 19:16:43 -0000 Received: (qmail 7247 invoked by uid 22791); 24 Jan 2006 19:16:42 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.203) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Jan 2006 19:16:40 +0000 Received: by zproxy.gmail.com with SMTP id l1so1166592nzf for ; Tue, 24 Jan 2006 11:16:38 -0800 (PST) Received: by 10.36.80.4 with SMTP id d4mr5103252nzb; Tue, 24 Jan 2006 11:16:38 -0800 (PST) Received: by 10.37.2.42 with HTTP; Tue, 24 Jan 2006 11:16:38 -0800 (PST) Message-ID: <8f2776cb0601241116l3338806mc334d157e5553481@mail.gmail.com> Date: Tue, 24 Jan 2006 19:16:00 -0000 From: Jim Blandy To: Jim Blandy , Andrew STUBBS , Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [RFC] Alternate approach to keeping convenience variables In-Reply-To: <20060124184348.GA22916@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4381DC75.80800@st.com> <8f2776cb0511212138g2adef40cr1632365c00e3bebc@mail.gmail.com> <43835114.5060401@st.com> <20051209205923.GA21331@nevyn.them.org> <8f2776cb0601231429y38714c9bm830991b4b037ec70@mail.gmail.com> <43D60D20.2080004@st.com> <8f2776cb0601241040u3f542b15s2efae535170a6492@mail.gmail.com> <20060124184348.GA22916@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00364.txt.bz2 On 1/24/06, Daniel Jacobowitz wrote: > > Right, but there's no way to test for that in the scripting language. > > Your 'init-if-undefined' command has to be a primitive, implemented in > > C. My argument was that having the variables always be present is > > more convenient for user-defined commands. > > Andrew's point is that such a primitive was recently committed :-) If you want your user-defined command to print a helpful error mesage, you can't use that in an 'if'. If we had some operator like $defined($foo), then that'd be different.