GNU bug report logs - #80129
[PATCH] Remove redundant cl-lib runtime dependencies across lisp/

Previous Next

Package: emacs;

Reported by: Kenta USAMI <zonuexe <at> zonu.me>

Date: Sun, 4 Jan 2026 18:54:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 80129 AT debbugs.gnu.org.

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

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


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#80129; Package emacs. (Sun, 04 Jan 2026 18:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenta USAMI <zonuexe <at> zonu.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Jan 2026 18:54:03 GMT) Full text and rfc822 format available.

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

From: Kenta USAMI <zonuexe <at> zonu.me>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Remove redundant cl-lib runtime dependencies across lisp/
Date: Mon, 5 Jan 2026 03:52:48 +0900
[Message part 1 (text/plain, inline)]
Hello,

This patch series removes redundant cl-lib dependencies that are no
longer necessary following the movement of incf and decf into the Emacs
core in Emacs 31.

Patch 1 adds a new audit tool: admin/cl-lib-deps-report.el. This is a
standalone Elisp script that identifies where cl-lib is required but not
used at runtime or compile-time, helping to maintain a lean dependency
tree.

Patch 2 and Patch 3 apply the cleanup to the gnus/ directory and other
libraries under lisp/, respectively. These changes remove (require
'cl-lib) from approximately 50 files where the audit tool confirmed they
were no longer providing necessary runtime symbols.

The script also highlights cases where cl-lib is used but missing an
explicit require, though those fixes are not included in this series to
keep it focused on the cleanup.

All changes have been verified to compile without regression.

Best regards,

Kenta Usami
[Message part 2 (text/html, inline)]
[0001-Add-admin-cl-lib-deps-report.el-to-audit-cl-lib-depe.patch (application/octet-stream, attachment)]
[0002-Gnus-Remove-redundant-cl-lib-runtime-dependencies.patch (application/octet-stream, attachment)]
[0003-Remove-redundant-cl-lib-runtime-dependencies-across-.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#80129; Package emacs. (Sun, 04 Jan 2026 20:15:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kenta USAMI <zonuexe <at> zonu.me>
Cc: 80129 <at> debbugs.gnu.org
Subject: Re: bug#80129: [PATCH] Remove redundant cl-lib runtime dependencies
 across lisp/
Date: Sun, 04 Jan 2026 22:14:36 +0200
> From: Kenta USAMI <zonuexe <at> zonu.me>
> Date: Mon, 5 Jan 2026 03:52:48 +0900
> 
> This patch series removes redundant cl-lib dependencies that are no
> longer necessary following the movement of incf and decf into the Emacs
> core in Emacs 31.
> 
> Patch 1 adds a new audit tool: admin/cl-lib-deps-report.el. This is a
> standalone Elisp script that identifies where cl-lib is required but not
> used at runtime or compile-time, helping to maintain a lean dependency
> tree.
> 
> Patch 2 and Patch 3 apply the cleanup to the gnus/ directory and other
> libraries under lisp/, respectively. These changes remove (require
> 'cl-lib) from approximately 50 files where the audit tool confirmed they
> were no longer providing necessary runtime symbols.

Thanks.

I don't think we can do this with Org files, not without talking to
Org developers first, because Org is also available for a separate
download, so it is not tightly coupled with Emacs core.  Same with
Tramp (which is available from ELPA) and possibly also use-package.
And I wouldn't waste energy and risk complications with packages in
lisp/obsolete/, since they are basically kept there for backward
compatibility.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#80129; Package emacs. (Sun, 11 Jan 2026 15:00:02 GMT) Full text and rfc822 format available.

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

From: Kenta USAMI <zonuexe <at> zonu.me>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 80129 <at> debbugs.gnu.org
Subject: Re: bug#80129: [PATCH] Remove redundant cl-lib runtime dependencies
 across lisp/
Date: Sun, 11 Jan 2026 23:58:45 +0900
[Message part 1 (text/plain, inline)]
Hello,

> I don't think we can do this with Org files, not without talking to
> Org developers first, because Org is also available for a separate
> download, so it is not tightly coupled with Emacs core.  Same with
> Tramp (which is available from ELPA) and possibly also use-package.
> And I wouldn't waste energy and risk complications with packages in
> lisp/obsolete/, since they are basically kept there for backward
> compatibility.

Thank you for the comments. I have revised the patches to exclude Org,
Tramp, use-package, and obsolete libraries as suggested.

I am attaching the updated v2 patch series.

Best regards,

Kenta Usami

2026年1月5日(月) 5:14 Eli Zaretskii <eliz <at> gnu.org>:

> > From: Kenta USAMI <zonuexe <at> zonu.me>
> > Date: Mon, 5 Jan 2026 03:52:48 +0900
> >
> > This patch series removes redundant cl-lib dependencies that are no
> > longer necessary following the movement of incf and decf into the Emacs
> > core in Emacs 31.
> >
> > Patch 1 adds a new audit tool: admin/cl-lib-deps-report.el. This is a
> > standalone Elisp script that identifies where cl-lib is required but not
> > used at runtime or compile-time, helping to maintain a lean dependency
> > tree.
> >
> > Patch 2 and Patch 3 apply the cleanup to the gnus/ directory and other
> > libraries under lisp/, respectively. These changes remove (require
> > 'cl-lib) from approximately 50 files where the audit tool confirmed they
> > were no longer providing necessary runtime symbols.
>
> Thanks.
>
> I don't think we can do this with Org files, not without talking to
> Org developers first, because Org is also available for a separate
> download, so it is not tightly coupled with Emacs core.  Same with
> Tramp (which is available from ELPA) and possibly also use-package.
> And I wouldn't waste energy and risk complications with packages in
> lisp/obsolete/, since they are basically kept there for backward
> compatibility.
>
[Message part 2 (text/html, inline)]
[0001-Add-admin-cl-lib-deps-report.el-to-audit-cl-lib-depe.patch (application/octet-stream, attachment)]
[0002-Gnus-Remove-redundant-cl-lib-runtime-dependencies.patch (application/octet-stream, attachment)]
[0003-Remove-redundant-cl-lib-runtime-dependencies-across-.patch (application/octet-stream, attachment)]

This bug report was last modified today.

Previous Next


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