From: Lars Ingebrigtsen Date: Mon, 17 Jun 2019 10:09:18 +0000 (+0200) Subject: Add check for enabled warning before issuing X-Git-Tag: emacs-27.0.90~2450 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3ccc0d623a44af8238ffa5d97e6976395e47fc9a;p=emacs.git Add check for enabled warning before issuing * lisp/emacs-lisp/bytecomp.el (byte-compile-function-warn): Check whether we want the `obsolete' warning before issuing it. --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 66dfe4302f4..9e3e603c043 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1397,7 +1397,8 @@ when printing the error message." (defun byte-compile-function-warn (f nargs def) (byte-compile-set-symbol-position f) - (when (get f 'byte-obsolete-info) + (when (and (get f 'byte-obsolete-info) + (byte-compile-warning-enabled-p 'obsolete f)) (byte-compile-warn-obsolete f)) ;; Check to see if the function will be available at runtime