From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.bugs Subject: bug#72414: 29.4; use-package :defer keyword does not honor ":defer nil" Date: Fri, 02 Aug 2024 15:32:07 -0700 Message-ID: References: <87r0b7akin.fsf@priss.frightenedpiglet.com> <86bk2bwjol.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10354"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 72414@debbugs.gnu.org, Derek Upham To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 03 00:36:17 2024 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 1sa0si-0002YM-Ho for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Aug 2024 00:36:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sa0sR-0001Zz-Ow; Fri, 02 Aug 2024 18:35:59 -0400 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 1sa0sC-0001ZV-W5 for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 18:35:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sa0sC-0004H0-I8 for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 18:35:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=ms5vlPlADJbcYWzwyDXCnNhld+Piph3To7xenDpyNis=; b=tI6MJr50qUOlveU83NmsgCBKUffYqIvklUn7sncvJ8ao4OedG1A/dLAZXj0VDSjISwJ7ZgnI7xa9vKHaFHcucb0QIe10LzYdrvOSR1fJsoc9SKJ+E4W29fjHIhi/PMSpOBt2+MEEApHSXbT6GE9xZvEv9YQaMXajbVOoN2z8J5C/05OEeAjs6LLhG9dq4y/dfc5D26KjHAQ6d8x5Z/TOejhiKqll59fpk1BaF/aL5jGcmqMNbFlh7DUCtGaOwF5UjNXOzIvzlO7xbcyFj2OULvURLYE8hadglk9w6C9Pepa7Cq9Vf+Bbw1axaOuIuzlWzRxVpLYEsJ/i9OP28EB8MQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sa0sU-00077V-Ad for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 18:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2024 22:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72414 X-GNU-PR-Package: emacs Original-Received: via spool by 72414-submit@debbugs.gnu.org id=B72414.172263810527286 (code B ref 72414); Fri, 02 Aug 2024 22:36:02 +0000 Original-Received: (at 72414) by debbugs.gnu.org; 2 Aug 2024 22:35:05 +0000 Original-Received: from localhost ([127.0.0.1]:53854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa0rZ-000762-9f for submit@debbugs.gnu.org; Fri, 02 Aug 2024 18:35:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa0rV-00075Q-G5 for 72414@debbugs.gnu.org; Fri, 02 Aug 2024 18:35:04 -0400 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 1sa0oz-0003cC-TN; Fri, 02 Aug 2024 18:32:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ms5vlPlADJbcYWzwyDXCnNhld+Piph3To7xenDpyNis=; b=KpqNSh3LXSiabK93d8LM +Ng7ZTH0ZugsQq6nCa9y3g6VUhy2AC3/JtzLm2bsH7BQpL+PyokpcdVIlBULVE57F/OKM7rCFFBlx 43ikZ8PMC2IjXv4Mgf75w5zHa4+M0AoZTXGMho5yXabA+hidcZ76F41GWSsSuP/ShNkDY+RAaPFSk OF8i2JI3YSd1FWL53IKUERCPoT/nCZHxJ9VeXsxwhfOoF7k6wR5Qycl6l43Un2b/ExSvw5Mf2AOrj dkVXTcfkpBHPKfygqSMhUCEKCDT5/XoSRBWIM+wFzM4Ebxe8PW1tcV/tTtKUN0+kiKNvjQ0fbqcQc TSQq4j+1jb2N/Q==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrkedugddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhffkfgfgggtgfesthhqredttderjeenucfhrhhomheplfhohhhn ucghihgvghhlvgihuceojhhohhhnfiesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epiefftdehvdeivddtffefffffveekledujeeiledtudefheefhffhfeegjeetfeegnecu ffhomhgrihhnpehnvgifrghrthhishgrnhhsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhohhhnfidomhgvshhmthhprghuthhh phgvrhhsohhnrghlihhthidqieekjeektdelgeegqddujeejheefkeduiedqjhhohhhnfi eppehgnhhurdhorhhgsehnvgifrghrthhishgrnhhsrdgtohhmpdhnsggprhgtphhtthho pedt X-ME-Proxy: Feedback-ID: ib64945b7:Fastmail In-Reply-To: <86bk2bwjol.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 02 Aug 2024 08:57:46 +0300") 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:289652 Archived-At: >>>>> Eli Zaretskii writes: >> The way the code above uses plist-member doesn't match the >> documentation. The test looks for the simple presence of a :defer >> key/value, and doesn't distinguish between any of the possible values: >> t, nil, or an integer. >>=20 >> Replacing plist-member with plist-get should fix the problem. A ":defer >> nil" would produce the same nil value as a missing :defer. > Thanks for the report and the analysis. > > John, any comments or suggestions about this? This sounds like a very good analysis, and I=E2=80=99m so glad you caught t= his. Yes, it shouldn=E2=80=99t just be a plist membership test; it should lookup the = member in the plist AND if it=E2=80=99s present and non-nil, then the truth of the co= ndition should be established. So, from: (when (and (not (plist-member args :load)) (not (plist-member args :defer)) (not (plist-member args :no-require))) (setq args (append args `(:load (,name))))) to: (when (and (not (plist-get args :load)) (not (plist-get args :defer)) (not (plist-get args :no-require))) (setq args (append args `(:load (,name))))) --=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2