unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: defvar inside let-binding (was: bug#9090: 24.0.50; void-variable jka-compr-verbose)
Date: Mon, 18 Jul 2011 10:03:20 -0400	[thread overview]
Message-ID: <jwvd3h7wv3a.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3hb6nct3e.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Fri, 15 Jul 2011 20:11:01 +0200")

>>> When starting emacs, I'm getting a warning "Warning: defvar ignored
>>> because jka-compr-verbose is let-bound".
>> Fixed.
> Sorry; my fault.  The binding/later-loading thing is pretty annoying in
> general, though.

Yes.

> Has changing the way `defvar' works in the presence of let-bindings been
> discussed? 

No.  Personally I can't see how to make it work, because by the time we
get to defvar it's kind of too late.  Maybe we could try to change the
let-binding so that the "saved void state" (which will be restored at
the end of the outer let) gets changed as if the var had been defvarred
before the let-binding.  But it sounds terribly hackish.

Of course, another problem is that in the case of defcustom we don't
even detect the problem.


        Stefan



       reply	other threads:[~2011-07-18 14:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87sjq7pq14.fsf@yun.yagibdah.de>
     [not found] ` <1ztyanqxv5.fsf@fencepost.gnu.org>
     [not found]   ` <m3hb6nct3e.fsf@quimbies.gnus.org>
2011-07-18 14:03     ` Stefan Monnier [this message]
2011-07-18 14:20       ` defvar inside let-binding Lars Magne Ingebrigtsen
2011-07-18 16:18         ` Stefan Monnier
2011-07-19 16:14           ` Lars Magne Ingebrigtsen
2011-08-01 21:20             ` Stefan Monnier
2011-08-02 13:42               ` Lars Magne Ingebrigtsen
2011-08-02 19:22                 ` Stefan Monnier
2011-08-02 19:56                   ` Lars Magne Ingebrigtsen
2011-08-02 20:47                     ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwvd3h7wv3a.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).