1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

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.
This commit is contained in:
Lars Ingebrigtsen 2019-06-17 12:09:18 +02:00
parent 3820b77c9e
commit 3ccc0d623a

View file

@ -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