[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master d895f6c: Fix Edebug specs for 'cl-defmethod' an

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master d895f6c: Fix Edebug specs for 'cl-defmethod' and 'defmethod'
Date: Wed, 10 May 2017 11:18:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>>> -             [ &optional keywordp ]     ; this is key :before etc
>>> -             list                       ; arguments
>>> +             [ &optional keywordp       ; this is key :before etc
>>> +               &optional stringp ]      ; :extra can be followed by a 
>>> string
>> Actually, there can be any number of non-lists between the function name
>> and the arg list.  So it should probably be more like [ &rest atom ] or
>> something like that.

> By the way, do we want to support methods with zero arguments here? nil is
> an atom, and not a list.

IIRC CLOS does not allow 0-arg methods (and it allows nil as a qualifier),
whereas cl-defmethod uses `listp` to distinguish args from qualifiers,
so it doesn't allow nil as qualifier (tho I suspect it doesn't handle
a 0-arg method "correctly" either).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]