GNU bug report logs -
#72414
29.4; use-package :defer keyword does not honor ":defer nil"
Previous Next
Reported by: Derek Upham <derek_upham <at> mailfence.com>
Date: Thu, 1 Aug 2024 23:32:02 UTC
Severity: normal
Found in version 29.4
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 72414-done <at> debbugs.gnu.org (full text, mbox):
> From: John Wiegley <johnw <at> gnu.org>
> Cc: Derek Upham <derek_upham <at> mailfence.com>, 72414 <at> debbugs.gnu.org
> Date: Fri, 02 Aug 2024 15:32:07 -0700
>
> >>>>> Eli Zaretskii <eliz <at> 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.
This bug report was last modified 346 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.