emacs-devel
[Top][All Lists]
Advanced

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

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


From: Davis Herring
Subject: RE: question about "Making change-major-mode-hook buffer-local whilelocally let-bound!"
Date: Sun, 20 Jun 2010 13:56:01 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-5.el5_4.10.lanl1

> Also, should this message really be displayed at runtime?  It seems
> like the kind of commentary-on-source-code that would be more
> appropriate for the byte-compiler.  Why subject runtime users to such
> commentary?  In the code in question, this message is shown each time
> a pp command is used.

The byte-compiler doesn't know that a variable is let-bound at the time
that you are making it buffer-local.  I don't suppose it's theoretically
impossible (cf. Rice's theorem) for the byte-compiler to detect
(potential) calls to functions that make certain variables local (since so
few functions do so) within let-bindings for those same variable, but it
would be a lot of effort.

That said, we could arrange for the message to be shown only once per
variable per session.  It wouldn't be perfect, since more than one piece
of code might do this for the same variable, but hopefully there are so
few instances of this that there would be no collisions.

Davis

-- 
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
shipping.



reply via email to

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