[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: Dmitry Gutov
Subject: Re: [Emacs-diffs] master d895f6c: Fix Edebug specs for 'cl-defmethod' and 'defmethod'
Date: Thu, 11 May 2017 00:49:55 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Thunderbird/53.0

On 10.05.2017 18:18, Stefan Monnier wrote:

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).

Seems to handle it okay, these both work:

(cl-defgeneric foo ()
  (1+ 2))

(cl-defmethod foo ()
  (1+ 4))

The latter redefines the default method, but that's to be expected.

If we want to support that kind of cl-defmethod in edebug, apparently we shold replace [&rest atom] with [&rest [&not listp]].

reply via email to

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