From: Noam Postavsky <npostavs@users.sourceforge.net>
To: "Yuri D'Elia" <wavexx@thregr.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: "reference to free variable" only during initialization
Date: Mon, 16 Jan 2017 18:47:01 -0500 [thread overview]
Message-ID: <CAM-tV-8DEB_V7xyQEanAYfpjC0vDOTPStqu6giDuUXdap9rLDQ@mail.gmail.com> (raw)
In-Reply-To: <87ziiq4nll.fsf@wavexx.thregr.org>
On Mon, Jan 16, 2017 at 6:00 PM, Yuri D'Elia <wavexx@thregr.org> wrote:
> I have an oddball warning that I have an hard time debugging. I upgraded
> to emacs 25.1.1 on a debian desktop recently, and started to get:
>
> Warning (bytecomp): reference to free variable ‘isearchp-reg-beg’
>
> during startup. The warning is generated by requiring
> modeline-posn.el[1], which is using ``isearchp-reg-beg`` (actually
> defvar-ed early on) inside a defadvice form.
>
> Is this expected?
There is some unexpected interaction of defadvice with delayed
warnings. I had noticed this a while back, but never got around to
fixing it. `ad-compile-function' binds `warning-suppress-types', but
if warnings are delayed, then the warning call happens after that
binding is finished.
>
> Warning aside, the intriguing part is that the warning /only/ occurs
> when (require 'modeline-posn) is evaluated in my ~/.emacs, but is not
> emitted instead when doing the "allegedly" equivalent:
>
> emacs -q -l ~/.emacs
In this case, the warnings are not delayed. If you set after-init-time
to nil, then warnings will be delayed, so the same problem should
occur, I think:
emacs -q --eval '(setq after-init-time nil)' -l ~/.emacs
I think Bug #24106 might be a similar case (and I'm pretty sure
there's another older one where I initially noticed this, but I can't
find it right now).
next prev parent reply other threads:[~2017-01-16 23:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-16 23:00 "reference to free variable" only during initialization Yuri D'Elia
2017-01-16 23:47 ` Noam Postavsky [this message]
2017-01-25 17:15 ` Yuri D'Elia
2017-01-25 19:50 ` Noam Postavsky
2017-01-25 19:51 ` Noam Postavsky
2017-02-18 23:01 ` Yuri D'Elia
2017-02-19 4:18 ` Noam Postavsky
2017-02-19 12:32 ` Yuri D'Elia
2017-02-19 13:44 ` Noam Postavsky
2017-02-19 14:22 ` Yuri D'Elia
2017-02-19 15:58 ` Drew Adams
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=CAM-tV-8DEB_V7xyQEanAYfpjC0vDOTPStqu6giDuUXdap9rLDQ@mail.gmail.com \
--to=npostavs@users.sourceforge.net \
--cc=emacs-devel@gnu.org \
--cc=wavexx@thregr.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.