all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 14926@debbugs.gnu.org
Subject: bug#14926: 24.3.50; Warning "`make-variable-buffer-local' should be called at toplevel"
Date: Sun, 21 Jul 2013 21:31:26 -0700 (PDT)	[thread overview]
Message-ID: <893be673-2c77-4803-8c09-dbaf87521c54@default> (raw)
In-Reply-To: <jwvehar47yp.fsf-monnier+emacs@gnu.org>

> > 2. What is wrong with code such as this at top level?
> 
> Nothing.  But most of the cases I bumped into (all of which have
> been fixed now, AFAIK)

I guess you mean problems in the distributed code (?).

> were cases where the author had confused make-local-variable
> and make-variable-buffer-local.

Fair enough.  That is worth trying to help users with.  And it
has long been something needing reminding.

For things like that, I don't tend to favor compiler warnings.
I tend to favor improving the doc or adding a wiki page or a
tutorial video or...

Anyway, is the current approach (warning about anything not at
top level) the best way?  I think it confuses more than it helps.
I understand that it is well-intentioned.  But I don't think the
resulting noise and confusion are worth it.  If the lesson is
not clear and accurate then the course isn't worth taking or
giving.

Can you characterize better the case where we want people to use
(or not to use) `make-variable-buffer-local'?  IOW, just saying
you should use this at top level is too gross (and not correct).

Can you improve the spec a bit and then the implementation so
the warning appears only when it should (or almost only then)?





  reply	other threads:[~2013-07-22  4:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-21 21:11 bug#14926: 24.3.50; Warning "`make-variable-buffer-local' should be called at toplevel" Drew Adams
2013-07-22  2:59 ` Stefan Monnier
2013-07-22  4:31   ` Drew Adams [this message]
2013-08-15 14:43   ` Michael Heerdegen
2013-08-15 16:33     ` Stefan Monnier
2013-08-15 18:19       ` Michael Heerdegen
2013-08-16  6:54       ` Glenn Morris
2013-08-16  7:34         ` Drew Adams
2013-08-16  7:45         ` Juanma Barranquero
2013-08-16 11:09           ` Michael Heerdegen
2013-08-16 14:07             ` Drew Adams
2013-08-16 21:23               ` Michael Heerdegen
2013-08-16 22:14                 ` Drew Adams
2013-08-16 16:25           ` Stefan Monnier
2013-08-16 16:31             ` Juanma Barranquero
2013-08-16 17:58             ` Drew Adams
2013-08-16 18:01             ` Glenn Morris
2013-08-16 21:26               ` Michael Heerdegen
2013-08-16 21:40                 ` Glenn Morris
2013-08-16 23:02                   ` Michael Heerdegen
2014-02-08  5:28           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=893be673-2c77-4803-8c09-dbaf87521c54@default \
    --to=drew.adams@oracle.com \
    --cc=14926@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.