From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#59057: Emacs 29. Byte compiler sometimes forgets about a defvar. Date: Thu, 24 Nov 2022 11:29:32 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16360"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , 59057@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 24 20:30:20 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 1oyHvP-00044V-BQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Nov 2022 20:30:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyHvB-0002Ht-Ne; Thu, 24 Nov 2022 14:30:05 -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 1oyHv9-0002Gr-Oz for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:30:04 -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 1oyHv9-0003rR-8L for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyHv9-0006uj-0z for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 14:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Nov 2022 19:30: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.166931818026503 (code B ref 59057); Thu, 24 Nov 2022 19:30:02 +0000 Original-Received: (at 59057) by debbugs.gnu.org; 24 Nov 2022 19:29:40 +0000 Original-Received: from localhost ([127.0.0.1]:60239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyHum-0006tP-E6 for submit@debbugs.gnu.org; Thu, 24 Nov 2022 14:29:40 -0500 Original-Received: from mail-oa1-f45.google.com ([209.85.160.45]:44726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyHuk-0006tB-Ev for 59057@debbugs.gnu.org; Thu, 24 Nov 2022 14:29:38 -0500 Original-Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-142306beb9aso2876892fac.11 for <59057@debbugs.gnu.org>; Thu, 24 Nov 2022 11:29:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=B4OKCsD9qjMZ16emFsCCIqKLJu87+sOp3vTGGBptYbc=; b=FAfPyvLBKyRUQif1nXlTCktH4QT07UYL+VOgw8/larn8BlcmLWcWrKyG6qyMQCrxJw Zb9OSfHh6brRP+y6mV9QEk6SEksKrd8kAQ5mP9qIMvF5UhWs9xg/K6WMqSa/KvmN1O8l Xlv7T1DBkwmon15Pg4szsqHf6ud2JzVIEuRUip/72cA6+AiaByaE9bVJ/nLaDmhKUBp6 kQJzLxd83QOlYiAlXcKxtE0IqP0SzsTLXAPw8UvUpN/PmLUrxTKB7dz9PiKSLmchYCr1 SttZlswBrb9bZwW2zkkoFE6tE3X0tIk8vjdQeAW1VJG+2/PICe5Eotk1aLwPvwebO1Mv Nk3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B4OKCsD9qjMZ16emFsCCIqKLJu87+sOp3vTGGBptYbc=; b=M7cMmz3aFnB2w1583Mo+4J3yf2peg6Ha6wNL5uxYuL0dY2N1BQGChCixGhdmle95Sm fqTn9xDj5G9WdauICSyBf+euwUHMXdxqwcRFGGIXZzv3SVPhhP1KJMNAD1dCVOY279E6 x4D7UrOogJOhxgPKqRmFFnYrS6pckQRqGVdHBWWi4kXV9IpSL9rsPUmhsM4ttfQO6tWl Vy0L5cfAlidBOw1eV4TDz5V+Q2pBI7Jj7HWRKYwnzZ23v/eR0EcwX6AVG9idWTrmrbAV wGISVvIpWVhkvJT7pAfNppkL5pWYRHApUHDXpJebM32QFSp/z5W7TsDgbmwOdlVQlYRH ufXQ== X-Gm-Message-State: ANoB5pnjnglyl4VjBPpkpNiowrz8AxeoAxgV6pyNlDMNPdcT0gWfV5kd YAU7CvUZ3Qy3cFHR+qVT7sT3pmBtBau69jDmzNE= X-Google-Smtp-Source: AA0mqf6Sbju3v+P0gjjnLOL7MyYbGHh1fwriOEJrjlkBtZGGezUbJvYiVh7qpihVSqmeUwcIZTePKAXy4VJcJxSPKCw= X-Received: by 2002:a05:6870:cc89:b0:12b:fbe7:b793 with SMTP id ot9-20020a056870cc8900b0012bfbe7b793mr21388375oab.92.1669318172843; Thu, 24 Nov 2022 11:29:32 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 24 Nov 2022 11:29:32 -0800 In-Reply-To: (Stefan Monnier's message of "Wed, 09 Nov 2022 12:54:57 -0500") X-Hashcash: 1:20:221124:59057@debbugs.gnu.org::zdVhoLhhxPkM5oj7:CxAX 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:248902 Archived-At: 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?