From: Eshel Yaron Date: Sat, 19 Oct 2024 18:33:45 +0000 (+0200) Subject: Don't emit obsolete function warning for recursive calls X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c0472d22866ea44a58f978e3fb3352e0ecb83c2b;p=emacs.git Don't emit obsolete function warning for recursive calls --- 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"))