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: Sat, 18 Feb 2017 23:18:59 -0500 [thread overview]
Message-ID: <CAM-tV-8RJ8xpCNw_D96CtFx_25Oc7gXMnx7fbkLhQqpc6XUeRQ@mail.gmail.com> (raw)
In-Reply-To: <87efyv9k8t.fsf@wavexx.thregr.org>
On Sat, Feb 18, 2017 at 6:01 PM, Yuri D'Elia <wavexx@thregr.org> wrote:
> with ~/.emacs.d/lisp containing modeline-posn.el from melpa. There's no
> other file. I indeed had to add (package-initialize) to reproduce the
> issue, but I'm not sure why it has some influence. Maybe just some
> delay.
>
> Right off the bat, could you reproduce it with this?
Yes, the reason package-initialize matters is just that it loads
bytecomp and advice.el only decides to compile if that has been
loaded:
(defun ad-should-compile (function compile)
(cond
...
;; everything else means `maybe':
(t (featurep 'byte-compile))))
(bytecomp.el provides both `bytecomp' and `byte-compile').
>
> Evaling after-init-time makes no difference,
--eval '(setq after-init-time t)' has no effect, but doing
(let ((after-init-time t))
(require 'modeline-posn))
in the init.el file does prevent the warning from popping up. It also
improves the error message: the prefix becomes
".emacs.d/lisp/modeline-posn.el:Warning:" instead of "Warning
(bytecomp):". This is because byte compilation is let-binding
warning-prefix-function which is not saved for delayed warnings.
next prev parent reply other threads:[~2017-02-19 4:18 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
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 [this message]
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
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=CAM-tV-8RJ8xpCNw_D96CtFx_25Oc7gXMnx7fbkLhQqpc6XUeRQ@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 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).