GNU bug report logs - #66615
30.0.50; Inconsistent 'number-or-marker' type definition in the cl- machinery

Previous Next

Package: emacs;

Reported by: Andrea Corallo <acorallo <at> gnu.org>

Date: Wed, 18 Oct 2023 18:07:02 UTC

Severity: normal

Found in version 30.0.50

Done: Andrea Corallo <acorallo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Andrea Corallo <acorallo <at> gnu.org>
Cc: bug-gnu-emacs <at> gnu.org,
 Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
Subject: Re: 30.0.50; Inconsistent 'number-or-marker' type definition in the
 cl- machinery
Date: Wed, 18 Oct 2023 14:30:38 -0400
> My question is, why do we consider 'number-or-marker' in the first place
> a type if we support the or syntax in `cl-typep' like
> (cl-typep 3 '(or marker number)) ?

I'm not sure I can give a good answer in general, but I can tell you
some reasons that explain some of what we see:

- There is a `number-or-marker-p` primitive and `cl-typep` doesn't know
  how to use it for `(or number marker)`.
- method specializers (currently) can't be `(or number marker)` but can be
  `number-or-marker`.

> I'd like to fix this inconsistency in order to progress with my
> development, originally I worked out the attached patch but I now
> suspect that (unless there's a specific reason) we should just remove
> 'number-or-marker' as a type entirely instead.

I'd lean towards keeping it :-)

> PS also I think we have a similar issue/question with
> 'integer-or-marker'.

Yup.


        Stefan





This bug report was last modified 1 year and 213 days ago.

Previous Next


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