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#72414: 29.4; use-package :defer keyword does not honor ":defer nil" Date: Sun, 04 Aug 2024 11:53:35 +0300 Message-ID: <86bk28sm7k.fsf@gnu.org> References: <87r0b7akin.fsf@priss.frightenedpiglet.com> <86bk2bwjol.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35349"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72414-done@debbugs.gnu.org, derek_upham@mailfence.com To: John Wiegley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 04 10:55:12 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 1saX1D-000919-C5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Aug 2024 10:55:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saX0n-0006KY-6z; Sun, 04 Aug 2024 04:54:45 -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 1saX0j-0006JF-Tu for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 04:54:41 -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 1saX0j-0008BU-Jn for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 04:54:41 -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:References:In-Reply-To:From:Date:To:Subject; bh=I7b/fI4kDuKaThGBLLRPn+gHNCIbU+gmS1shZ3s0M+M=; b=cXpwJ3diRk1foZWl/MXD1ksTZqXtdH4a7ASVXr6Q7OjHs5UTb/Xyp6+HWyIvX156ubLM2jE/QbO37QZ7Om5MusB3BrcdNQeZTNj3ZmjH3epnQe01AmWMcDcnMXn/jtGoDaMpl34ygdoPRHkrrACV5Li5dGgn3pEQ3eUoAvECGwdgirgR+5zS/spe91TXTxdY7Jf+brmym1Up8J8sPY1z/sYjVrdKXfnCTylqmb2hb9CX1o/BuPJiN8+omAxNsUAolmG4dOF0+HclLCR+sSdCQ75Xdig4hmdtE+waHMLgSsowTlS1ImWS3noToOqjS+LObD9wBN3dRR3neTsT4yEc6Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1saX14-000807-Ai for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2024 04:55:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Aug 2024 08:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 72414 X-GNU-PR-Package: emacs Mail-Followup-To: 72414@debbugs.gnu.org, eliz@gnu.org, derek_upham@mailfence.com Original-Received: via spool by 72414-done@debbugs.gnu.org id=D72414.172276165630608 (code D ref 72414); Sun, 04 Aug 2024 08:55:02 +0000 Original-Received: (at 72414-done) by debbugs.gnu.org; 4 Aug 2024 08:54:16 +0000 Original-Received: from localhost ([127.0.0.1]:55474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saX0J-0007xc-N6 for submit@debbugs.gnu.org; Sun, 04 Aug 2024 04:54:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saX0G-0007x3-Vw for 72414-done@debbugs.gnu.org; Sun, 04 Aug 2024 04:54:13 -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 1saWzo-00085v-Pg; Sun, 04 Aug 2024 04:53:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=I7b/fI4kDuKaThGBLLRPn+gHNCIbU+gmS1shZ3s0M+M=; b=gDHTAVEF1tqMmIW6Bp2t IOYMLsaR2UD5WdXeYfNAFOwPPUNEAJxzvflpEm5Jas7hZ+LQ5tkGBW04HcSBFudheQ5iQ7Zz9Q0Mn 03vt9nVrc6hd47d3iYaVBcusIo0PcEZETA/z4Tae9YOelOWPPfFN7rmA9QLPgeRZrqlS8CpAyb4M6 85K+ZDtdZkw11ZV3ALAwMjYiSTGhW6KD/XWiJ/W+Abrypa+eBRZk4V/cgqZoiPqu2aqbvVKXneWRn YdX+pnuF9Xs1QCQSeXmbf4jD+LTNBKLfMoQoSjHkCZuDNIaNqFX5rHD3LvtPChSTVf8jhFJxV0F2E U+Hd2YaZOpA2cg==; In-Reply-To: (message from John Wiegley on Fri, 02 Aug 2024 15:32:07 -0700) 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:289734 Archived-At: > From: John Wiegley > Cc: Derek Upham , 72414@debbugs.gnu.org > Date: Fri, 02 Aug 2024 15:32:07 -0700 > > >>>>> 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. > >> > >> 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’m so glad you caught this. Yes, > it shouldn’t just be a plist membership test; it should lookup the member in > the plist AND if it’s present and non-nil, then the truth of the condition > 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))))) Thanks, installed on the emacs-30 release branch, and closing the bug.