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: Thu, 15 Aug 2002 13:53:56 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200208151953.g7FJruJ07836@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> <200208132247.g7DMl6w07259@wijiji.santafe.edu> <87ofc5tgv0.fsf@zagadka.ping.de> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1029441299 12983 127.0.0.1 (15 Aug 2002 19:54:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 15 Aug 2002 19:54:59 +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 17fQhu-0003NI-00 for ; Thu, 15 Aug 2002 21:54:58 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17fR7X-00058W-00 for ; Thu, 15 Aug 2002 22:21:27 +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 17fQis-0000Zg-00; Thu, 15 Aug 2002 15:55:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17fQhL-0008UD-00 for emacs-devel@gnu.org; Thu, 15 Aug 2002 15:54:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17fQh7-0008Or-00 for emacs-devel@gnu.org; Thu, 15 Aug 2002 15:54:16 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fQh5-0008Nz-00; Thu, 15 Aug 2002 15:54:07 -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 g7FJsH501278; Thu, 15 Aug 2002 13:54:17 -0600 (MDT) Original-Received: (from rms@localhost) by wijiji.santafe.edu (8.11.6+Sun/8.9.3) id g7FJruJ07836; Thu, 15 Aug 2002 13:53:56 -0600 (MDT) X-Authentication-Warning: wijiji.santafe.edu: rms set sender to rms@wijiji using -f Original-To: mvo@zagadka.ping.de In-Reply-To: <87ofc5tgv0.fsf@zagadka.ping.de> (message from Marius Vollmer on 14 Aug 2002 20:50:11 +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:6567 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6567 There is a nearly standard macro out there called 'fluid-let' that encapsulates the process completely. For example It looks like the right idea, though the name is confusing given that it does not use fluids. Since the name fluid-let seems to be widely known, perhaps fluids should be given a different name. They could be called per-threads or thread cells. > These functions could also have code for correct interaction with > buffer-local bindings and frame-local bindings. Does this refer to the fact that buffer-localness and frame-localness are not completely independent from dynamic scoping? The point is, if the value that was saved by fluid-let came from a buffer-local binding, it needs to restore that value into the same buffer-local binding. If the value that was saved was from the buffer-global binding, fluid-let needs to restore that value into the buffer-global binding. The expansion of fluid-let needs extra code both when saving and when restoring, to do this. What would need to change in the above example when case-fold-search would be a buffer-local variable? I am too overloaded to try to write the code (and I'd have to restudy Scheme too). Is my explanation above clear? This needs to be done for all variables, since any might perhaps be made buffer-local. fluid-let could expand into the proper code for this. It might be useful to define a function to get the value and status of a variable, and a function to restore based on that value and status. (The status would identify the current buffer-local binding or whatever.) Then the expansion of fluid-let would call these functions.