From c0472d22866ea44a58f978e3fb3352e0ecb83c2b Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 19 Oct 2024 20:33:45 +0200 Subject: [PATCH] Don't emit obsolete function warning for recursive calls --- lisp/emacs-lisp/bytecomp.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index c510c418d57..b9b62040b5d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1533,6 +1533,7 @@ when printing the error message." (defun byte-compile-function-warn (f nargs def) (when (and (get f 'byte-obsolete-info) + (not (eq f byte-compile-current-form)) ; Recursive call. (not (memq f byte-compile-not-obsolete-funcs))) (byte-compile-warn-obsolete f "function")) -- 2.39.5