all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 36567@debbugs.gnu.org
Subject: bug#36567: cl-defgeneric defeats (with-suppressed-warnings ((obsolete fun)) ...)
Date: Thu, 11 Jul 2019 16:14:34 +0200	[thread overview]
Message-ID: <m3bly0y7xx.fsf@gnus.org> (raw)
In-Reply-To: <CADwFkmnNAwb+-j5Pz3_kvD8+wyXXbEuKjq03AiOMaNp-BEA1Gg@mail.gmail.com> (Stefan Kangas's message of "Thu, 11 Jul 2019 01:01:19 +0200")

Stefan Kangas <stefan@marxist.se> 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	other threads:[~2019-07-11 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10  3:11 bug#36567: cl-defgeneric defeats (with-suppressed-warnings ((obsolete fun)) ...) Stefan Kangas
2019-07-10 12:15 ` Lars Ingebrigtsen
2019-07-10 23:01   ` Stefan Kangas
2019-07-11 14:14     ` Lars Ingebrigtsen [this message]
2019-07-13  9:19       ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bly0y7xx.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=36567@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.