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


View this message in rfc822 format

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: bug#77725: 31.0.50; Add support for types accepted by `cl-typep' to cl-generic?
Date: Fri, 2 May 2025 14:55:42 +0200
[Message part 1 (text/plain, inline)]
On 2025-05-02 11:24, David Ponce wrote:
>>
>> Please find attached a version of cl-types.el with my first try at
>> implementing something related to your idea above to populate a
>> `cl--type-dispatch-list' from `cl-generic-generalizers'.
> 

Sorry, here is the correct patch, and updated change log.

2025-05-02  David Ponce  <da_vid <at> orange.fr>
            Stefan Monnier <monnier <at> iro.umontreal.ca>

	* lisp/emacs-lisp/cl-types.el (cl--type-list): Doc string.
	(cl--type-dispatch-list): New variable.
	(cl--type-parents): Make it a plain defun.
	(cl--type-children, cl--type-dag): Remove.
	(cl--type-undefine): Remove duplicate test for `cl--type-p'.  Use
	`cl--class-children'.  Clear `cl--type-flag' instead of
	`cl--type-error'.  Also remove type from the dispatch list.
	(cl--type-deftype): Doc string.  Remove useless safeguard of
	data on error.  Fix some error messages.  Clear `cl--type-flag'
	when a type is (re)defined.  Just push new types on
	`cl--type-list'.
	(cl--type-error): Set `cl--type-flag' to the symbol `error' and
	remove type in error from the dispatch list.
	(cl-types-of): Doc string.  Remove useless check for
	`cl-type-class-p'.  Skip types which we are sure will not match.
	Simplify creation of the DAG.
	(cl--type-generalizer): In the tagcode-function, check only types
	that can be dispatched.
	(cl-generic-generalizers): Populate the dispatch list.
[cl-types.patch (text/x-patch, 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.