[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36567: cl-defgeneric defeats (with-suppressed-warnings ((obsolete fu
From: |
Stefan Kangas |
Subject: |
bug#36567: cl-defgeneric defeats (with-suppressed-warnings ((obsolete fun)) ...) |
Date: |
Thu, 11 Jul 2019 01:01:19 +0200 |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Oh! No, it's warning about the defgeneric itself? Compiling this leads
> to a warning (if it's already defined):
>
> (require 'cl-generic)
> (cl-defgeneric foo ()
> (declare (obsolete nil nil))
> t)
>
> Compiling this doesn't:
>
> (require 'cl-generic)
> (with-suppressed-warnings ((obsolete foo))
> (cl-defgeneric foo ()
> (declare (obsolete nil nil))
> t))
>
> So... I think... perhaps this is not a bug?
Interesting. It looks like there is indeed no bug in
with-suppressed-warnings.
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.
Thanks,
Stefan Kangas