all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, 50898@debbugs.gnu.org
Subject: bug#50898: 28.0.50; with-suppressed-warnings doesn't always work
Date: Tue, 30 Nov 2021 08:50:10 -0500	[thread overview]
Message-ID: <jwvr1axkb9e.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87tuftojab.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 30 Nov 2021 14:38:36 +0100")

> This should now work again on the trunk.

Hmm...

    @@ -216,10 +216,11 @@ macroexp-macroexpand
             (let* ((fun (car form))
                    (obsolete (get fun 'byte-obsolete-info)))
               (macroexp-warn-and-return
    -           (macroexp--obsolete-warning
    -            fun obsolete
    -            (if (symbolp (symbol-function fun))
    -                "alias" "macro"))
    +           (and (byte-compile-warning-enabled-p 'obsolete fun)
    +                (macroexp--obsolete-warning
    +                 fun obsolete
    +                 (if (symbolp (symbol-function fun))
    +                     "alias" "macro")))
                new-form 'obsolete))
           new-form)))

I suspect this can fail if `bytecomp.el` is not yet loaded.

I think "the right way" to do that is to improve
`macroexp-warn-and-return` so that instead of only receiving `obsolete`
as `category` to decide if the warning is enabled or not, it should
additionally also receive `fun`.


        Stefan






  reply	other threads:[~2021-11-30 13:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 18:53 bug#50898: 28.0.50; with-suppressed-warnings doesn't always work Lars Ingebrigtsen
2021-09-30  0:51 ` Michael Heerdegen
2021-11-30 13:38   ` Lars Ingebrigtsen
2021-11-30 13:50     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-30 14:19       ` Lars Ingebrigtsen
2021-11-30 17:31         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-01  3:31           ` Lars Ingebrigtsen

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=jwvr1axkb9e.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=50898@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /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.