GNU bug report logs - #3467
23.0.94; let + make-local-variable => let value made global

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Thu, 4 Jun 2009 21:20:04 UTC

Severity: normal

Tags: wontfix

Merged with 10604

Found in version 23.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #95 received at 3467 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 3467 <at> debbugs.gnu.org
Subject: Re: bug#3467: 23.0.94; let + make-local-variable => let value made 
	global
Date: Sat, 13 Jun 2009 00:24:43 +0200
[Message part 1 (text/plain, inline)]
On Sun, Jun 7, 2009 at 3:11 AM, Lennart
Borgman<lennart.borgman <at> gmail.com> wrote:
> Rethinking. Everything is wrong in my solution and suggestion. Coming back.


Ok, here is what I believe is a reasonable solution.

The first problem is that the semantics of let,
make-variable-buffer-local etc are not clearly defined. I suggest the
following semantics (instead of the one I proposed before):

- When (let ...) shadows a variable it is exactly this variable (ie
default or buffer local version) that should be revived after (let
...).

- No buffer local variables should be deleted or created by the
reviving of the shadowed variables after the (let ...) clause.

- More exactly: if the variable is buffer local in the current buffer
before (let ..) it is the buffer local variable in that buffer that
should be revived. If it does not exist after (let..) nothing should
be done.

- And if a shadowed variable have been made buffer local during the
let binding then it is still the default value that should be revived.
The buffer local value should in this case not be changed after the
(let ..) clause.

I think with this semantics everything will be nearly as fast as
before and there will be no such surprises as shown in this bug. What
do others think?


I have made a patch for this with some comments and questions. I have
included this in my patched version of Emacs+EmacsW32 and have been
using it myself for a couple of days without any problems.

However please review this carefully and especially what I have called
/* Case 1 in specbind */ in unbind_to.
[eval-bug3467.diff (application/octet-stream, attachment)]

This bug report was last modified 9 years and 198 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.