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: Stefan Kangas <stefankangas <at> gmail.com>
To: 76247 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, Mattias EngdegÄrd <mattiase <at> acm.org>
Subject: bug#76247: 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)]

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.