bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36567: cl-defgeneric defeats (with-suppressed-warnings ((obsolete fu


From: Lars Ingebrigtsen
Subject: bug#36567: cl-defgeneric defeats (with-suppressed-warnings ((obsolete fun)) ...)
Date: Thu, 11 Jul 2019 16:14:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Kangas <address@hidden> writes:

> Is it also expected that the cl-defgeneric in the first case gives a
> warning?  I don't get a warning if I replace "cl-defgeneric" with
> "defun" in that case.  I would expect only usage of an obsolete
> cl-defgeneric to give a warning, not its definition.  My expectations
> may be wrong.

The defgeneric machinery has its own separate warning system outside of
the byte compiler which is why things are slightly odd in this area.

But currently, both cl-defgeneric and cl-defmethod warn if you try to
an obsolete method.  I think that makes sense for cl-defmethod (because
it's a "use", sort of, of an obsolete method), but perhaps it does not
make sense for cl-defgeneric?

As for defun -- if you've made a function obsolete, and then defun it, I
think not giving a warning is conceptually sound, because you're
defining something brand new.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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