From: Michael Heerdegen <michael_heerdegen@web.de>
To: Glenn Morris <rgm@gnu.org>
Cc: 14926@debbugs.gnu.org
Subject: bug#14926: 24.3.50; Warning "`make-variable-buffer-local' should be called at toplevel"
Date: Sat, 17 Aug 2013 01:02:36 +0200 [thread overview]
Message-ID: <878v012q9f.fsf@web.de> (raw)
In-Reply-To: <xepptd1fho.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 16 Aug 2013 17:40:35 -0400")
Glenn Morris <rgm@gnu.org> writes:
> This feature is 8 years old, BTW.
>
> So "Is this something new?" in Jul 2013 tells you something about how
> much of an issue this has been in practice.
I'll tell you something funny. When Stefan said that 99% of
non-top-level uses of `make-variable-buffer-local' were wrong, I
searched my large .emacs for counter-examples. I found 4 such places,
and for every place, it was by mistake! Of course I knew the difference
when I wrote that code, but these function names sound so similar...
All these occurrences were wrapped inside something like
(add-hook 'hook (lambda () ... (make-variable-buffer-local ...)))
or inside `with-eval-after-load' (that also wraps the body inside a
lambda) and no warning had been printed all the time.
It would be good to warn also for calls inside lambdas.
Michael.
next prev parent reply other threads:[~2013-08-16 23:02 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
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 [this message]
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=878v012q9f.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=14926@debbugs.gnu.org \
--cc=rgm@gnu.org \
/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.