From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#3467: 23.0.94; let + make-local-variable => let value made global Date: Fri, 5 Jun 2009 16:21:37 +0200 Message-ID: References: Reply-To: Lennart Borgman , 3467@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1244212673 5759 80.91.229.12 (5 Jun 2009 14:37:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jun 2009 14:37:53 +0000 (UTC) To: 3467@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 05 16:37:50 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MCaYC-0004vJ-U0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jun 2009 16:37:45 +0200 Original-Received: from localhost ([127.0.0.1]:38390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCaYC-000768-Dw for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jun 2009 10:37:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCaXu-0006xg-5f for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 10:37:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCaXp-0006ut-EI for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 10:37:25 -0400 Original-Received: from [199.232.76.173] (port=52603 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCaXp-0006uq-7s for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 10:37:21 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47957) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MCaXo-0005YS-KR for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2009 10:37:20 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n55EbIvD007556; Fri, 5 Jun 2009 07:37:18 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n55EU4lG006282; Fri, 5 Jun 2009 07:30:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Lennart Borgman Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 05 Jun 2009 14:30:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3467 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3467-submit@emacsbugs.donarmstrong.com id=B3467.12442117035488 (code B ref 3467); Fri, 05 Jun 2009 14:30:04 +0000 Original-Received: (at 3467) by emacsbugs.donarmstrong.com; 5 Jun 2009 14:21:43 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n55ELcKk005483 for <3467@emacsbugs.donarmstrong.com>; Fri, 5 Jun 2009 07:21:40 -0700 Original-Received: by fg-out-1718.google.com with SMTP id e12so198225fga.20 for <3467@emacsbugs.donarmstrong.com>; Fri, 05 Jun 2009 07:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tlPiGt/6aSEqY/yA+qToFqAMaLpEbc+AmdHhW6EYL7E=; b=TDC1rGh9PjPuYZ+zBcxK6iHIW494tbmsbzEc6aMJi4eCdAMCRrqmfJ18Cy9Ro1y5gL g4opeH/X2I4LnsHeEuHEJtHHl8NvRzviLRv2WFu1OcpTO1Q0hX4q0WG6RXGUSwnkCoi4 weqL/jsBRiiqSASI7remJvyZJtq2VH+VSqCgk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=A+dT99wZR0UMJ+2uMQT6nyEJbAnoyeTOiapJUh82HXg0idpkQXzZb38dKCtvZfWHs1 3BX0Vr8014CmcOSm6CHGxFYWKWwnfYdpnpOdu8Ym6gSQbvY0RpwwpHt/l9+CwMoRDkYz FrVpMyew3gGffGh3/D4kT4pSSJtyFS5VuaXWc= Original-Received: by 10.239.136.202 with SMTP id i10mr256432hbi.151.1244211697819; Fri, 05 Jun 2009 07:21:37 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 05 Jun 2009 10:37:25 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28506 Archived-At: On Thu, Jun 4, 2009 at 11:14 PM, Lennart Borgman wrote: > If you eval these lines > > =C2=A0(defvar w14 "global") > =C2=A0(defvar w15 "global") > =C2=A0(let ((w14 "let") > =C2=A0 =C2=A0 =C2=A0 =C2=A0(w15 "let")) > =C2=A0 =C2=A0(set (make-local-variable 'w14) "local") > =C2=A0 =C2=A0(message "w14 maybe let: in buffer=3D%S, global=3D%S" w14 (d= efault-value 'w14)) > =C2=A0 =C2=A0(message "w15 maybe let: in buffer=3D%S, global=3D%S" w15 (d= efault-value 'w15))) > =C2=A0(message "w14 top level: in buffer=3D%S, global=3D%S" w14 (default-= value 'w14)) > =C2=A0(message "w15 top level: in buffer=3D%S, global=3D%S" w15 (default-= value 'w15)) > > the output will be > > =C2=A0w14 maybe let: in buffer=3D"local", global=3D"let" > =C2=A0w15 maybe let: in buffer=3D"let", global=3D"let" > =C2=A0w14 top level: in buffer=3D"global", global=3D"let" > =C2=A0w15 top level: in buffer=3D"global", global=3D"global" > > All values here except w14 global value on next last line are arguably > correct. The last value of w14 should be "global", not "let". > > It looks like perhaps the call to (make-local-variable w14) does not > mark the "global let" value of w14 as let bound (or removes that > mark). I think the semantics of let, make-variable-buffer-local and buffer local variables must be examined a bit to clarify this: I think let should preserve "buffer localness" otherwise it might do something quite different from what a user probably expect. Fortunately this as far as I can see requires only a change in Flet. After Fprogn and before calling unbound_to the variable values must be reset to those matching the buffer and frame localness before let. spec_bind has saved the buffer and frame localness just before Fprogn so I guess one can compare with what is saved there. However no one would want me to write the C code for this... ;-) - Someone who is better than me at that should preferrably do it. (BTW: gmail does not automatically enter the reply address when I make a reply to the original bug mail. Is that a bug in gmail?)