From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: "reference to free variable" only during initialization Date: Sat, 18 Feb 2017 23:18:59 -0500 Message-ID: References: <87ziiq4nll.fsf@wavexx.thregr.org> <877f5j3vto.fsf@wavexx.thregr.org> <87efyv9k8t.fsf@wavexx.thregr.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1487477987 32454 195.159.176.226 (19 Feb 2017 04:19:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Feb 2017 04:19:47 +0000 (UTC) Cc: Emacs developers To: "Yuri D'Elia" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 19 05:19:41 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfIyL-0007QW-1Z for ged-emacs-devel@m.gmane.org; Sun, 19 Feb 2017 05:19:41 +0100 Original-Received: from localhost ([::1]:60676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfIyL-0004OD-Jj for ged-emacs-devel@m.gmane.org; Sat, 18 Feb 2017 23:19:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfIxh-0004MS-BM for emacs-devel@gnu.org; Sat, 18 Feb 2017 23:19:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfIxg-00025v-FX for emacs-devel@gnu.org; Sat, 18 Feb 2017 23:19:01 -0500 Original-Received: from mail-ot0-x234.google.com ([2607:f8b0:4003:c0f::234]:34688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cfIxg-00025k-Ak for emacs-devel@gnu.org; Sat, 18 Feb 2017 23:19:00 -0500 Original-Received: by mail-ot0-x234.google.com with SMTP id x10so12534285otb.1 for ; Sat, 18 Feb 2017 20:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Oe5fI2soIXVfk2BOdjhQ0JvT7qSILPELdcA0EgpAfXs=; b=U7Mj3yxOikielS93geGOXw6zV2KHg0Y7fj7Tsnba8EzXVODxvVYJVMfoayFVtTCT8q fiREspPj2oAwJWzfD8h7nc4EpuF3KZpYtMPSczYpSbM0w6On8glq46v7B0WFM/1zZ7Z7 wnhZcr89mkQnZh8CYVG2HTOOS8rhSimlerUzOfsJwWcfR3WHcIigkdt8t4lGe6VYADiJ 8MgB2MuCpB71Us+N++Uc5OhxEcTJJz5wXmIcNP1ngIodzCiW6HxTZrW0VGTYd90BcTXW QQe0l/zdS1Qm5d/6sTDJczR379+q436pe0lx3nkFFvpe8tXHPvf6BoVGLg5mE3U27aO2 eElQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Oe5fI2soIXVfk2BOdjhQ0JvT7qSILPELdcA0EgpAfXs=; b=NLSbIHfkjw6RSjkdQXjPRkgOKjILOrQQgTUDOA5B9Po5cI3Zah94kjFtrVvb0w6x0/ 7YeDFy5u75ZGGHZcGeJECM008NwcG/u6JOZ98zuH0//rjPpr9t+6N8uKZQmYDzop8gXg SKyJ17vnQGXCNV3UZNtgFf0FPUnfM1JWFQzWaUXpENF+TrRnUybV9+qIk3NIfkcGqgtV 3RZE5DpWbckI62/ON+o6zEPUERtWmKBg3gl3mqcairmF2Cl7fBs+UsUDxjir3RG6uc5C u5dvAiWefCPQSAW50HDC3c1hxLeIeJhgMLE3qJvDnil2mJr7ApVgmdYXMHMFNjQYdTAv Uljw== X-Gm-Message-State: AMke39nUcjzI8KtyhAtvkGXReA3bZkbKZia6ItsuoW/GmAeATmHHbnXUBdnyMViYqqpyCWGNJMEuMzynTJ8VSw== X-Received: by 10.157.52.180 with SMTP id g49mr1328905otc.267.1487477939543; Sat, 18 Feb 2017 20:18:59 -0800 (PST) Original-Received: by 10.157.11.21 with HTTP; Sat, 18 Feb 2017 20:18:59 -0800 (PST) In-Reply-To: <87efyv9k8t.fsf@wavexx.thregr.org> X-Google-Sender-Auth: mwxnHXAIKEP3WZgjgSGWzGwQz3Q X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c0f::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212461 Archived-At: On Sat, Feb 18, 2017 at 6:01 PM, Yuri D'Elia 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.