all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: John Wiegley <johnw@gnu.org>
Cc: 72414-done@debbugs.gnu.org, derek_upham@mailfence.com
Subject: bug#72414: 29.4; use-package :defer keyword does not honor ":defer nil"
Date: Sun, 04 Aug 2024 11:53:35 +0300	[thread overview]
Message-ID: <86bk28sm7k.fsf@gnu.org> (raw)
In-Reply-To: <m2cymqsgig.fsf@gnu.org> (message from John Wiegley on Fri, 02 Aug 2024 15:32:07 -0700)

> From: John Wiegley <johnw@gnu.org>
> Cc: Derek Upham <derek_upham@mailfence.com>,  72414@debbugs.gnu.org
> Date: Fri, 02 Aug 2024 15:32:07 -0700
> 
> >>>>> Eli Zaretskii <eliz@gnu.org> 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.





      reply	other threads:[~2024-08-04  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 23:30 bug#72414: 29.4; use-package :defer keyword does not honor ":defer nil" Derek Upham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-02  5:57 ` Eli Zaretskii
2024-08-02 22:32   ` John Wiegley
2024-08-04  8:53     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86bk28sm7k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72414-done@debbugs.gnu.org \
    --cc=derek_upham@mailfence.com \
    --cc=johnw@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.