[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 whileloca

From: Drew Adams
Subject: RE: question about "Making change-major-mode-hook buffer-local whilelocally let-bound!"
Date: Sun, 20 Jun 2010 14:24:26 -0700

> > 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 was not suggesting that the byte-compiler should try to do this either. ;-)
My point was that this is a commentary on code, not help for the user.  It is
the _kind_ of thing (comment on code) that the byte-compiler does.  It is not
the kind of thing that we normally put in runtime messages to the user.

My question was why we would even think about subjecting Emacs _users_ to such a
code-commenting message.

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

Why bother?  What is gained by having such a runtime message?

This kind of suggestion/hint belongs in the docs perhaps, but why also interrupt
users with it?  I have a hard time believing we would do this by design (not to
mention using `!' in such a message).

Messages to the user should generally reflect things the _user_ has done or is
able to do.  Telling a user that some executing code is "making
change-major-mode-hook buffer-local while [it is] locally let-bound [by some
other code]" is ridiculous, er, misguided, IMHO.

Anyway, this was only a side question.  Assuming this _will_ be imposed on us
(on n'arrete pas le progres), what is the answer to my original query?  What is
a good way to inhibit `change-major-mode-hook' temporarily?  And what is a good
way to suppress this message (preferably only this message)?

reply via email to

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