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: Mon, 16 Jan 2017 18:47:01 -0500 Message-ID: References: <87ziiq4nll.fsf@wavexx.thregr.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484610473 22395 195.159.176.226 (16 Jan 2017 23:47:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2017 23:47:53 +0000 (UTC) Cc: Emacs developers To: "Yuri D'Elia" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 17 00:47:49 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 1cTH00-0004EG-HP for ged-emacs-devel@m.gmane.org; Tue, 17 Jan 2017 00:47:40 +0100 Original-Received: from localhost ([::1]:60417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTH00-00088G-5t for ged-emacs-devel@m.gmane.org; Mon, 16 Jan 2017 18:47:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTGzS-000880-0L for emacs-devel@gnu.org; Mon, 16 Jan 2017 18:47:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTGzR-0005FP-0x for emacs-devel@gnu.org; Mon, 16 Jan 2017 18:47:06 -0500 Original-Received: from mail-ot0-x22b.google.com ([2607:f8b0:4003:c0f::22b]:32895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTGzQ-0005FI-Rq for emacs-devel@gnu.org; Mon, 16 Jan 2017 18:47:04 -0500 Original-Received: by mail-ot0-x22b.google.com with SMTP id 73so52604386otj.0 for ; Mon, 16 Jan 2017 15:47:03 -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:content-transfer-encoding; bh=RvJUm+h0U6scZgjPjxoNQdv0Gv+5DUOy5rqDzW+V7Sc=; b=RAsDTazumROyim+qEvGos/24aeIwwnEkR8hzvmwpzu91PG79bhjXmbZFRd8TFcLQ+k nnN7huNO9rq4VhqlgmYwTNrOSnLFliOKouKnuOTu0wjY7BZXt4nUbogOOrG93iJmARjl XEPggMEmpfNMg217RK2QgdcdWnlgrAx1u8fVxL01pBWjJSaL54HM5o89WacktjwBm4ME 58h7Dd1pGUbzBzZcLAZCM3z2cSwY4U7hfqJ/FDPy3YiVc+AQmFIFT25/EVWHaQnqVMeg krDE9U2KszZgcGXNCoZjcJfNEj5pfqN/ar+FrasmW28w1SGiTiK+zQBav6gQXjVWsvQz Q9qA== 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:content-transfer-encoding; bh=RvJUm+h0U6scZgjPjxoNQdv0Gv+5DUOy5rqDzW+V7Sc=; b=ogYfZjdfD6w3r0eKtxooCABrCvGchs73morkuY0SsSEPvHyVoMhFjgwawLvpNHLZyB 8/ucO/H4btxjA36kYZCT8txsiLuLn8c53v3SZXOQHgCB3GidZR0Ml5coJ588CGxLen7F Vls4uibbktwd59GrhE4P4VDfxNqJHTZhp+NgS6/XNR8/03+up+b0PEC+ikc4GGyXob+4 JtpADjiGGpUYawWItJQkwCJWmmn2fv2ZCYiNfG/H9mnHEaGWPKCxctGRkIUp5SCAjzHE wcJ5fjePzC1J97qBK3xc5aK6wuHLUGePay6Z2nXjJFDLwLI4s8OAuP8tIqDxRh2Mvez+ cHmQ== X-Gm-Message-State: AIkVDXIbvbjb6DmmAhtNRup8Ns8/KrQfCfBs+9bn4xCVepoPUG6TUuBDG6ea2iZuGllGIkZbtz/vk8VZqfG3Bg== X-Received: by 10.157.27.154 with SMTP id z26mr12780084otd.181.1484610422321; Mon, 16 Jan 2017 15:47:02 -0800 (PST) Original-Received: by 10.157.21.117 with HTTP; Mon, 16 Jan 2017 15:47:01 -0800 (PST) In-Reply-To: <87ziiq4nll.fsf@wavexx.thregr.org> X-Google-Sender-Auth: 1SWEC_L8Pow_27xquXBca3nhKKI X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c0f::22b 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:211341 Archived-At: On Mon, Jan 16, 2017 at 6:00 PM, Yuri D'Elia 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 =E2=80=98isearchp-reg-beg= =E2=80=99 > > 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).