GNU bug report logs -
#73881
31.0.50; Unexpected warnings about recursive occurrences of obsolete functions
Previous Next
Full log
Message #20 received at 73881 <at> debbugs.gnu.org (full text, mbox):
Hi,
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Hmm... I distinctly remember writing code to try and silence
> obsolescence warnings in the code coming from the same file as the
> `make-obsolete` call.
Ah good, sounds like a reasonable heuristic.
> If I installed that code into Emacs, clearly it's not doing its job.
>
> ..Hmm.. I think I see the problem: the code I wrote was for variables
> rather than for functions:
>
> ;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
> ;; actually use `toto' in order for this obsolete variable to still work
> ;; correctly, so paradoxically, while byte-compiling foo.el, the presence
> ;; of a make-obsolete-variable call for `toto' is an indication that `toto'
> ;; should not trigger obsolete-warnings in foo.el.
> (byte-defop-compiler-1 make-obsolete-variable)
> (defun byte-compile-make-obsolete-variable (form)
> (when (eq 'quote (car-safe (nth 1 form)))
> (push (nth 1 (nth 1 form)) byte-compile-global-not-obsolete-vars))
> (byte-compile-normal-call form))
>
> So maybe we should just do the same for `make-obsolete`?
SGTM.
Thanks,
Eshel
This bug report was last modified 233 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.