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: Wed, 25 Jan 2017 14:50:22 -0500 Message-ID: References: <87ziiq4nll.fsf@wavexx.thregr.org> <877f5j3vto.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 1485373862 29549 195.159.176.226 (25 Jan 2017 19:51:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2017 19:51:02 +0000 (UTC) Cc: Emacs developers To: "Yuri D'Elia" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 25 20:50:56 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 1cWTaY-0005PL-Qk for ged-emacs-devel@m.gmane.org; Wed, 25 Jan 2017 20:50:38 +0100 Original-Received: from localhost ([::1]:34219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWTab-0006p1-2m for ged-emacs-devel@m.gmane.org; Wed, 25 Jan 2017 14:50:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWTaM-0006nr-32 for emacs-devel@gnu.org; Wed, 25 Jan 2017 14:50:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWTaL-0005Zy-3a for emacs-devel@gnu.org; Wed, 25 Jan 2017 14:50:26 -0500 Original-Received: from mail-ot0-x234.google.com ([2607:f8b0:4003:c0f::234]:36004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cWTaK-0005ZR-V5 for emacs-devel@gnu.org; Wed, 25 Jan 2017 14:50:25 -0500 Original-Received: by mail-ot0-x234.google.com with SMTP id 32so1337780oth.3 for ; Wed, 25 Jan 2017 11:50:23 -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=pDD5NgLWGUzC2/fBI+Mu3m1gAgRRDleHcsAkeac5MGg=; b=EiFMxPDKDGK4T3JaQ3XImYcvJh6p5oN1URqOEuodLUvbQetoJ2mFkLINNL9RmfqTPD 0Lcp6v7TQVRxxC7Hvbl7jpKBdeiWBy1Bn1QqOug4+9gTodt7O7rk8jI1EkUD7JZ+7mQB +xNweDX7uv/2Gb5nEsDeZmmi9MB+foI+LyVRR/z2nQwB/bbv7HgdSZT3/qvzGHUR6R/b Dnw6bPHSdJL3c0VbsxVsIb/oX4crFwMR5R104iHp4h+YCgiMPHOtxp4CJBU1qHRFQseS rgNDM8jNrOMbZWA2J+Hvb0QSO3hSJNgQCRBfWwidIQjhpoCQ2mtQCFpPUZA+G5BY9ZLR 325g== 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=pDD5NgLWGUzC2/fBI+Mu3m1gAgRRDleHcsAkeac5MGg=; b=ORVWz1kHHep9Eq7+Gzz7tfNUOAzsCRyGeHikmdIcGypebeUvLhLqwfr6Mr9yvO3UHL X2GAaffqUFqGsZtHL+9z+ulavvZ8ns4zlfJpMGHoq5v8ZIhPNB2Cw8TWbrHuym+lMNVM +tsNMCn+TehUHkKPGsupKvrxUWzQTGCIcE8KnZZgzqHT1aVXAXfsog9IMKenKFHVUkBz BTnAcPlVi+SLek4fbXt2aBwLdv8NpYWBcZ8/mHxSV68+fdkPXieTxM21eugTQe58XDUX nqGPtHsLODZBEoklj6Qt4zbARJnVp/C9nSQVGpTOWRBDTS/GIQ3wpnHx5rIwkIiv1Ae3 yYJA== X-Gm-Message-State: AIkVDXIv7rRvNxiUtKKW/h7CFQ65IvNBNw+l6Ol3BLGCMNWFKO+t1EVgxGHZEWyJC+S7UZ7I9PqAOUta9ur6GA== X-Received: by 10.157.29.100 with SMTP id m91mr22852200otm.6.1485373822667; Wed, 25 Jan 2017 11:50:22 -0800 (PST) Original-Received: by 10.157.21.117 with HTTP; Wed, 25 Jan 2017 11:50:22 -0800 (PST) In-Reply-To: <877f5j3vto.fsf@wavexx.thregr.org> X-Google-Sender-Auth: vPmaneVsAV4Vy0SKq0ZCsklZwno 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:211602 Archived-At: On Wed, Jan 25, 2017 at 12:15 PM, Yuri D'Elia wrote: > On Mon, Jan 16 2017, Noam Postavsky wrote: >>> Warning (bytecomp): reference to free variable =E2=80=98isearchp-reg-be= g=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. > > This explains one difference, but it would mean that when the warning is > not delayed, it would be lost[!]. That would be more serious. It shouldn't be lost, `warning-suppress-types' just stops the *Warnings* buffer from popping up. The warnings are still logged in the background. >> 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 > > Actually, it doesn't work. No warning is generated in this case. Hmm, I can't reproduce your original case in 25.1 or 24.5, even after comme= nting (defvar isearchp-reg-beg) ; In `isearch+.el' (defvar isearchp-reg-end) ; In `isearch+.el' (defvar isearchp-restrict-to-region-flag) ; In `isearch+.el' at the top of modeline-posn.el. I have init.el with contents