]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't emit obsolete function warning for recursive calls
authorEshel Yaron <me@eshelyaron.com>
Sat, 19 Oct 2024 18:33:45 +0000 (20:33 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 19 Oct 2024 18:33:45 +0000 (20:33 +0200)
lisp/emacs-lisp/bytecomp.el

index c510c418d578a975c8dccfda8ead821998f19c3c..b9b62040b5d1710b1efb36c8f10417aa9820d259 100644 (file)
@@ -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"))