all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How do I remove "reference to free variable" warnings onbuffer-local variables?
Date: Mon, 09 Nov 2009 19:58:52 +0100	[thread overview]
Message-ID: <87d43r7cer.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <FA092323BF6A499D96F89DFBFB877F44@us.oracle.com> (Drew Adams's message of "Mon, 9 Nov 2009 09:40:12 -0800")

"Drew Adams" <drew.adams@oracle.com> writes:

Hi Drew,

> Again, I'm no expert on this. Others will no doubt correct me. But I'm
> pretty sure that the example you gave is not useful: the `boundp' test
> is not needed, and it doesn't do anything, since the "use" of the
> variable for which the warning would be suppressed here is simply
> `(defvar some-variable)', which doesn't issue a warning anyway.

Yes, you are right.  And even if it was bound an additional defvar (even
with an init value) would do no harm.  So simply put a

  (defvar foo)

to suppress the compiler warnings after double-checking that the
warnings are only caused by the fact that the variable is undefined only
at compile time and not at runtime.

Bye,
Tassilo




  reply	other threads:[~2009-11-09 18:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-09 15:10 How do I remove "reference to free variable" warnings on buffer-local variables? rocky
2009-11-09 16:45 ` Tassilo Horn
2009-11-09 17:40   ` How do I remove "reference to free variable" warnings onbuffer-local variables? Drew Adams
2009-11-09 18:58     ` Tassilo Horn [this message]
     [not found] ` <mailman.10351.1257785158.2239.help-gnu-emacs@gnu.org>
2009-11-09 17:28   ` How do I remove "reference to free variable" warnings on buffer-local variables? rocky
2009-11-09 17:40 ` Pascal J. Bourguignon
2009-11-11  5:09 ` 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

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

  git send-email \
    --in-reply-to=87d43r7cer.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@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.