GNU bug report logs - #77725
31.0.50; Add support for types accepted by `cl-typep' to cl-generic?

Previous Next

Package: emacs;

Reported by: David Ponce <da_vid <at> orange.fr>

Date: Fri, 11 Apr 2025 07:16:01 UTC

Severity: normal

Found in version 31.0.50

Full log


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

From: David Ponce <da_vid <at> orange.fr>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 77725 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#77725: 31.0.50; Add support for types accepted by `cl-typep'
 to cl-generic?
Date: Sat, 19 Apr 2025 12:11:25 +0200
[Message part 1 (text/plain, inline)]
> Regarding a possible merge in cl-lib, should cl-types.el be copied at
> the end of cl-lib, after cl-macs is loaded?  If I correctly understand
> the logic of loading these libs ;-)

I looked into this a bit more, and it turns out that cl-generic
depends on cl-lib, so the code in cl-types.el that depends on
cl-generic can't go in cl-lib. This concern the two definitions
at the end of cl-types.el:

(cl-generic-define-generalizer cl--type-generalizer
  ...
  )

(cl-defmethod cl-generic-generalizers :extra "cl-types-of" (type)
 ...
  )

which could logically go in cl-generic?

I attached a slightly updated version of cl-types.el, mainly to check
first if a type is of class `cl-type-class' in `cl-types-of', and to
use the predicate `cl-type-class-p' simpler than `cl-typep'.

Happy Easter weekend :-)
[cl-types.el (text/x-emacs-lisp, attachment)]

This bug report was last modified 10 days ago.

Previous Next


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