[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards a cleaner build

From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build
Date: Fri, 17 May 2019 16:07:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Lars Ingebrigtsen <address@hidden> writes:

> Oh, I think I understand now.  While compiling a function, we haven't
> yet registered that it's obsolete.

The following would fix that, so it still seems to be pretty easy to
implement the "don't warn about obsolete from obsolete functions".  But
I don't know whether there are other side effects here...

diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 842d1d48b4..c35aab2e02 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -92,6 +92,9 @@ defun-declarations-alist
                    (list 'quote f) (list 'quote arglist) (list 'quote when))))
    (list 'obsolete
          #'(lambda (f _args new-name when)
+             ;; Record obsolete info immediately so that we know that
+             ;; we're compiling an obsolete function.
+             (put f 'byte-obsolete-info (list new-name nil when))
              (list 'make-obsolete
                    (list 'quote f) (list 'quote new-name) (list 'quote when))))
    (list 'interactive-only

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]