[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: question about "Making change-major-mode-hook buffer-local while lo

From: Davis Herring
Subject: RE: question about "Making change-major-mode-hook buffer-local while locally let-bound!"
Date: Mon, 21 Jun 2010 22:01:20 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-5.el5_4.10.lanl3

> This, however, is not so clear. ;-) What I take away from it is that
> there is some unspecified problem somewhere that has no easy solution,
> so to encourage programmers not to write code that might manifest the
> problem you think it best to issue a runtime message about the
> problematic code.

There is no "unspecified problem": it does weird (and possibly buggy --
I'm not sure on this point) things to make buffer-local values for
variables that are let-bound at the time.  (I know it does buggy things if
you call `set-buffer' while a variable is both let-bound and buffer-local;
this is similar.)

What "has no easy solution" is that code that causes this undesirable
condition is hard to detect statically, so we detect it dynamically
instead.  But we believe that all such code can be fixed, so:

> That doesn't sound like a good approach, to me, but you know the
> details, not I.  I suppose it is a serious problem, in order to make
> it warrant such a strange remedy.

The remedy is not so strange if it persists only until the code that
triggers it is removed.  Since there is an easy way for your code to avoid
it, that's one less case now where it will be generated.

In other words this message is akin to an assertion failure message that
asks the user to file a bug report.  That's why it's OK that it's not the
user's doing.


This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during

reply via email to

[Prev in Thread] Current Thread [Next in Thread]