From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59057: Emacs 29. Byte compiler sometimes forgets about a defvar. Date: Thu, 24 Nov 2022 21:33:24 +0200 Message-ID: <83wn7kuozf.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35129"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, monnier@iro.umontreal.ca, 59057@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 24 20:34:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oyHzJ-0008tc-2u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Nov 2022 20:34:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyHz2-0003ue-9k; Thu, 24 Nov 2022 14:34:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyHz1-0003uU-7s for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:34:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyHz0-0004U3-Q8 for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyHz0-0000ry-DM for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Nov 2022 19:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59057 X-GNU-PR-Package: emacs Original-Received: via spool by 59057-submit@debbugs.gnu.org id=B59057.16693183933283 (code B ref 59057); Thu, 24 Nov 2022 19:34:02 +0000 Original-Received: (at 59057) by debbugs.gnu.org; 24 Nov 2022 19:33:13 +0000 Original-Received: from localhost ([127.0.0.1]:60254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyHyC-0000qs-Jx for submit@debbugs.gnu.org; Thu, 24 Nov 2022 14:33:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyHyA-0000qe-T6 for 59057@debbugs.gnu.org; Thu, 24 Nov 2022 14:33:11 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyHy4-0004Pe-AO; Thu, 24 Nov 2022 14:33:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VMxoLzXZPyX/G5o0+5jjZ6MTZWPKPCc4sRmIs034KSc=; b=QHD3dhjGyv9c LkTVY9YJyTQMjgRToq4VWUzOWvYGAlLbWh3+jQwBp3MWloe+FUpGGQbyiuRzoBYRwyib26FbMbjlg NnX5XQYftG4WzTeXgB8nIQVXP9WgCXFLb4mTwTbKpLZdS6lc4cdVy/bxkeQgwomgjLzbwJab1ThX+ mQIoz4UGDwbgNHHkhtyFaXJ430Y8UCBUFZ5f3ehMizYZtfCdl6Vc1Kbg9seTy6S9iLgxmTmWrdF4s 9q6Kls4vtOXQPSNmfwkW9PwvAdgIgTJcl+4W2yyLYxDDh0D+xQog5dGCwj+q68x5OR+Aqbta/0yeG CYqIn8YRERwlr6FmseNRqw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyHy3-0003mD-HJ; Thu, 24 Nov 2022 14:33:03 -0500 In-Reply-To: (message from Stefan Kangas on Thu, 24 Nov 2022 11:29:32 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248904 Archived-At: > Cc: Alan Mackenzie , 59057@debbugs.gnu.org > From: Stefan Kangas > Date: Thu, 24 Nov 2022 11:29:32 -0800 > > Stefan Monnier writes: > > >> The basic problem is that defvar is a dog's breakfast of a function. In > >> fact, it's two distinct functions sharing a name. These two functions > >> have little else to do with eachother. > > > > Yup. > > > >> And defvar appears to be the only function in Emacs where supplying nil > >> as an &optional argument has an effect different from omitting it. This > >> is bad for anybody trying to learn Emacs Lisp. > > > > Not the only one, sadly (`declare-function` comes to mind :-)), but yes, > > it's unusual. > > I guess defvar will have to stay as it is. But would it make sense to > add a new `declare-variable' function, and then document the form > > (defvar ) > > to be considered deprecated? It makes no sense to me to deprecate (defvar FOO). There are only disadvantages down that path (massive annoyance or breakage of third-party code, if nothing else). Please don't.