From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Emacs Lisp and Guile Date: Tue, 13 Aug 2002 16:47:06 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200208132247.g7DMl6w07259@wijiji.santafe.edu> References: <200207200035.g6K0ZAb27891@aztec.santafe.edu> <200207212015.g6LKF4c00874@aztec.santafe.edu> <200207251807.g6PI75d07615@aztec.santafe.edu> <874renlito.fsf@zagadka.ping.de> <200207271853.g6RIre710837@aztec.santafe.edu> <200207310554.g6V5ssc16508@aztec.santafe.edu> <200208021743.g72HhkX01596@aztec.santafe.edu> <200208110355.g7B3tk306295@wijiji.santafe.edu> <200208121705.g7CH5rI06514@wijiji.santafe.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1029278868 32101 127.0.0.1 (13 Aug 2002 22:47:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 13 Aug 2002 22:47:48 +0000 (UTC) Cc: neil@ossau.uklinux.net, raeburn@raeburn.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17ekS1-0008LY-00 for ; Wed, 14 Aug 2002 00:47:45 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17ekqk-0001Wn-00 for ; Wed, 14 Aug 2002 01:13:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ekSw-0007c5-00; Tue, 13 Aug 2002 18:48:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17ekS6-0007R8-00 for emacs-devel@gnu.org; Tue, 13 Aug 2002 18:47:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17ekS4-0007Qb-00 for emacs-devel@gnu.org; Tue, 13 Aug 2002 18:47:49 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ekS4-0007QC-00; Tue, 13 Aug 2002 18:47:48 -0400 Original-Received: from wijiji.santafe.edu (wijiji [192.12.12.5]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g7DMlQ506179; Tue, 13 Aug 2002 16:47:26 -0600 (MDT) Original-Received: (from rms@localhost) by wijiji.santafe.edu (8.11.6+Sun/8.9.3) id g7DMl6w07259; Tue, 13 Aug 2002 16:47:06 -0600 (MDT) X-Authentication-Warning: wijiji.santafe.edu: rms set sender to rms@wijiji using -f Original-To: marius.vollmer@uni-dortmund.de In-Reply-To: (message from Marius Vollmer on 12 Aug 2002 19:20:50 +0200) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6511 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6511 Having now seen the R5RS description of dynamic-wind, I see it is a very low-level mechanism. For the sake of using dynamic-wind for dynamic variable bindings, it would be convenient to have a function to swap in bindings and a function to swap out bindings. Then when you write calls to dynamic-wind, you would call these functions, not manipulate bindings directly. These functions could also have code for correct interaction with buffer-local bindings and frame-local bindings. No special primitive features would be needed for those, if they are implemented in an unoptimized fashion and always swap the values in and out immediately. The hardest part of the mechanism that Emacs uses now to implement in Guile is the optimization of not finding and swapping in a variable's current binding until a reference occurs. If Guile provided a mechanism to run arbitrary code for a variable reference, we could use that mechanism to implement this optimization. Suppose that Guile could run arbitrary code before and after the variable reference, for effect only, and the variable reference itself would always occur normally. This would not encourage people to use variables for jobs that ought to be done by functions, but would permit implementation of this optimization, and various sorts of forwarding. What do you think of this idea?