From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#33828: 26.1; Unbound defvar across compilation units
Date: Sat, 22 Dec 2018 23:40:50 +0100
Message-ID:
References:
<83muoybqc6.fsf@gnu.org> <87lg4i8ek3.fsf@gmail.com>
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 1545518406 28589 195.159.176.226 (22 Dec 2018 22:40:06 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 22 Dec 2018 22:40:06 +0000 (UTC)
Cc: luismbo@gmail.com, 33828@debbugs.gnu.org
To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 22 23:40:02 2018
Return-path:
Envelope-to: geb-bug-gnu-emacs@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 1gapwA-0007IF-67
for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Dec 2018 23:40:02 +0100
Original-Received: from localhost ([::1]:37377 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1gapyG-00022G-3M
for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Dec 2018 17:42:12 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36996)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1gapyA-000220-3G
for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2018 17:42:06 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1gapy7-0001vp-07
for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2018 17:42:06 -0500
Original-Received: from debbugs.gnu.org ([208.118.235.43]:56040)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1gapy6-0001vM-Sm
for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2018 17:42:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1gapy6-00068L-Gq
for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2018 17:42:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 22 Dec 2018 22:42:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 33828
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: notabug
Original-Received: via spool by 33828-submit@debbugs.gnu.org id=B33828.154551847223522
(code B ref 33828); Sat, 22 Dec 2018 22:42:02 +0000
Original-Received: (at 33828) by debbugs.gnu.org; 22 Dec 2018 22:41:12 +0000
Original-Received: from localhost ([127.0.0.1]:60298 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1gapxH-00067J-JV
for submit@debbugs.gnu.org; Sat, 22 Dec 2018 17:41:11 -0500
Original-Received: from mail-oi1-f175.google.com ([209.85.167.175]:34012)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1gapxD-00066s-GP
for 33828@debbugs.gnu.org; Sat, 22 Dec 2018 17:41:09 -0500
Original-Received: by mail-oi1-f175.google.com with SMTP id r62so7675515oie.1
for <33828@debbugs.gnu.org>; Sat, 22 Dec 2018 14:41:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc:content-transfer-encoding;
bh=gJxxtF3WM3L4Q2Db5Zs37e4rXnb4lf4R/vHyIMPlvOk=;
b=mBmsrZUxGKFndcQw9+CSdOCllCmszfpbL8e3fFpmzsD2QDsYX6U06Dk82do8VVHfeW
IGaAJhGf08LiFYVUbU0739fGt0qYlA5J/O1iTww2ll4rSkizBnh0/izXzXB3Kpehmk1Q
CyKytrBx/iFMq5umsz9Bbkq7RJ7VVFTOnHmw/Rl82rTrY0mSH1ifGaBDfXb7E4BCvuKa
Z/SVZQ7mQvsSxzpOBGceY5yP0YadQLgqqvDU5Ke0qRrwGPhazuCuAxwEfrMsgLM4E9lR
LbjEwh0aG1RaDRFeK84vAOW/onkBfATt44DaJblpVM848vQkWwZLofHCXT89U7i7TCC5
DVnw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc:content-transfer-encoding;
bh=gJxxtF3WM3L4Q2Db5Zs37e4rXnb4lf4R/vHyIMPlvOk=;
b=Zw4pOYoZcI+xDwJxF8eDbEu7zdpsrnlJobctzjaCxlrQioZ7f8LIhRAekuG5KpnN+t
VwWSGMwt/Arten6hr9bPVaVaf9DXG/TvU1nFzzN88UaeP23zfSeCvrvJMwmErrg799bC
ma3EIaRIDWls9GNthVucxH+VdmwtRzv5o5GNbGhhs2qWt01QZzNkc0YllO/fY/oB3JZZ
iZkC1SyiZnmp6j5i6TW7Oj+NbT111Klxp3PQpQwC0uB0no+P/EeJG12ioevm3Ev4j0Hz
Mee8DTlzt62vNDuK5Tu8raV0mn8p4uDOYKSjo+naw1gstdHpVc16W9hUwD83rCGnTTB1
XSBQ==
X-Gm-Message-State: AA+aEWZGDr//GYr5DV9cD3PS2Lq8+Cll+EO1xRi1x5CHVxIowMCGPVnh
hNcy0Ar3NAHN7ezPho41dY1fmFjYKxmidGoQdOQ=
X-Google-Smtp-Source: AFSGD/VAeKaMVAYY7G77dWnAN5gUneiAPZ7W8R/r1zobiNIgdy7qbnSKCmuOdT331lfBxEmK49ZG8YqDqRcbkrNnMiE=
X-Received: by 2002:aca:5d84:: with SMTP id r126mr4956744oib.227.1545518461755;
Sat, 22 Dec 2018 14:41:01 -0800 (PST)
In-Reply-To: <87lg4i8ek3.fsf@gmail.com>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors"
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.org gmane.emacs.bugs:153760
Archived-At:
Am Sa., 22. Dez. 2018 um 03:46 Uhr schrieb Jo=C3=A3o T=C3=A1vora :
>
> Eli Zaretskii writes:
>
> >> From: Lu=C3=ADs Oliveira
> >> Date: Fri, 21 Dec 2018 12:02:55 +0000
> >> Cc: Jo=C3=A3o T=C3=A1vora
> >>
> >> I think I've come across a bug.
> >
> > Doesn't look like a bug to me.
>
> Indeed, it's the behaviour described in the Emacs manual, but the
> motivation is questionable: it says it's useful for shooshing the
> byte-compiler's warnings. Aren't there better alternatives to do this
> instead of imposing this seeming inconsistency?
The better alternative is to explicitly `require' the library that
defines the variable.
I see the one-argument `defvar' as the variable equivalent to
`declare-function' - it announces that a variable exists without
defining it. (Maybe there should be a `declare-variable' macro to
mirror `declare-function'.) As such, its use should be exceptional;
most libraries should make sure to not have cyclic dependencies and
use plain `require'.