From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FZomO-000758-Ho for mharc-grub-devel@gnu.org; Sat, 29 Apr 2006 08:42:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZomN-00074u-9E for grub-devel@gnu.org; Sat, 29 Apr 2006 08:42:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZomL-00074d-Jz for grub-devel@gnu.org; Sat, 29 Apr 2006 08:42:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZomL-00074Z-Fy for grub-devel@gnu.org; Sat, 29 Apr 2006 08:42:29 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FZoph-0005aC-QX for grub-devel@gnu.org; Sat, 29 Apr 2006 08:45:58 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 180DC3C8BB42C for ; Sat, 29 Apr 2006 16:03:07 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id E08F43C8BB42A for ; Sat, 29 Apr 2006 16:03:06 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sat, 29 Apr 2006 14:42:28 +0200 User-Agent: KMail/1.8.2 References: <877j58boc2.fsf@xs4all.nl> <200604291404.57583.okuji@enbug.org> In-Reply-To: <200604291404.57583.okuji@enbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604291442.29130.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.001488, version=0.17.2 Subject: Re: Include X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Apr 2006 12:42:31 -0000 Currently, the commands default, timeout, etc. are ad-hoc, because they can be usual variables, but they are commands only for the menu context. I think the right way is to make a context for variables (and maybe for funcions as well). This can be implemented differently, that is, using handlers. Handlers can change the behavior of each variable arbitrarily. But I'm afraid that this is sometimes confusing, and could be a burden, if we want to define more menu-specific variables. For instance, I'm considering using variables to define a "theme" of the menu interface. This would require a lot of variables. If we use handlers, we would have so many special variables... IMO, handlers are exceptions, and less exceptions are better to understand the system. So I'd like to make variables more similar to BASH's semantics; by default, all variables should be local, and become global only when the user executes "export". Then, a reference of a variable means that GRUB first search the variable in the current context, then in the global context. This looks cleaner than the current implementation. Okuji