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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Subject: bug#76247: closed (Re: bug#76247: 31.0.50; side-effect-free
 properties not loading with (require 'cl-lib))
Date: Thu, 13 Feb 2025 16:53:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#76247: 31.0.50; side-effect-free properties not loading with (require 'cl-lib)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 76247 <at> debbugs.gnu.org.

-- 
76247: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76247
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.

[Message part 3 (message/rfc822, inline)]
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 4 (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)]

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.