GNU bug report logs - #73881
31.0.50; Unexpected warnings about recursive occurrences of obsolete functions

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Sat, 19 Oct 2024 13:25:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Eshel Yaron <me <at> eshelyaron.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Andrea Corallo <acorallo <at> gnu.org>, 73881 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#73881: 31.0.50; Unexpected warnings about recursive occurrences of obsolete functions
Date: Tue, 29 Oct 2024 08:21:00 +0100
Stefan Kangas <stefankangas <at> gmail.com> writes:

> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>> I propose the patch below (which also fixes a leak of
>> `byte-compile-global-not-obsolete-vars` to code compiled from other
>> files).
>> But I don't think it fixes the OP's problem because
>>
>>     (macroexpand '(defun my-foo () (declare (obsolete "blabla" "25")) 42))
>> =>
>>     (prog1 (defalias 'my-foo #'(lambda nil ...))
>>       (make-obsolete 'my-foo '"blabla" "25"))
>>
>> IOW, the `make-obsolete` comes *after* the function and thus my new code
>> will only silence warnings for calls to `my-foo` that are present
>> *after* the function definition.
>
> It looks like a step in the right direction to me.

To me as well.  Would there any harm in emitting the make-obsolete form
above the defalias form to cover also the warnings for recursive calls?


Best,

Eshel




This bug report was last modified 232 days ago.

Previous Next


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