GNU bug report logs - #76247
31.0.50; side-effect-free properties not loading with (require 'cl-lib)

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Thu, 13 Feb 2025 03:34:02 UTC

Severity: minor

Tags: patch

Found in version 31.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76247 in the body.
You can then email your comments to 76247 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, mattiase <at> acm.org, bug-gnu-emacs <at> gnu.org:
bug#76247; Package emacs. (Thu, 13 Feb 2025 03:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefankangas <at> gmail.com>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, mattiase <at> acm.org, bug-gnu-emacs <at> gnu.org. (Thu, 13 Feb 2025 03:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50;
 side-effect-free properties not loading with (require 'cl-lib)
Date: Wed, 12 Feb 2025 19:33:05 -0800
[Message part 1 (text/plain, inline)]
Requiring `cl-lib` is not enough to get the side-effect-free property on
functions like cl-fifth.  To see this, run emacs -Q and evaluate:

    (progn
      (require 'cl-lib)
      (describe-function 'cl-fifth)
      (function-get 'cl-fifth 'side-effect-free))

Note that the form returns nil, and that the "This function does not
change global state" text is not there in the *Help* buffer.

This can be fixed by adding this to the above recipe:

    (require 'cl-macs)

I have attached a patch that fixes this, and also gets the proper
(put 'cl-foo 'side-effect-free t) forms into cl-loaddefs.el.

If this looks okay, I think we could do the same for the
(side-effect-free error-free) case as well.
[0001-Inline-side-effect-free-declarations-in-cl-lib.el.patch (text/x-patch, attachment)]

Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 13 Feb 2025 06:55:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 13 Feb 2025 06:55:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Thu, 13 Feb 2025 16:53:01 GMT) Full text and rfc822 format available.

Notification sent to Stefan Kangas <stefankangas <at> gmail.com>:
bug acknowledged by developer. (Thu, 13 Feb 2025 16:53:02 GMT) Full text and rfc822 format available.

Message #14 received at 76247-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 76247-done <at> debbugs.gnu.org
Subject: Re: bug#76247: 31.0.50; side-effect-free properties not loading with
 (require 'cl-lib)
Date: Thu, 13 Feb 2025 08:52:05 -0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> I have attached a patch that fixes this, and also gets the proper
>> (put 'cl-foo 'side-effect-free t) forms into cl-loaddefs.el.
>>
>> If this looks okay, I think we could do the same for the
>> (side-effect-free error-free) case as well.
>
> LGTM!

Thanks, installed, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Mar 2025 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.