GNU bug report logs - #50898
28.0.50; with-suppressed-warnings doesn't always work

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Wed, 29 Sep 2021 18:54:01 UTC

Severity: normal

Merged with 50984

Found in versions 28.0.50, 28.0.60

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 50898 <at> 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
> 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





This bug report was last modified 3 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.