summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el3
1 files changed, 2 insertions, 1 deletions
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