Function: byte-compile-warning-enabled-p
byte-compile-warning-enabled-p is an autoloaded and byte-compiled
function defined in bytecomp.el.gz.
Signature
(byte-compile-warning-enabled-p WARNING &optional SYMBOL)
Documentation
Return non-nil if WARNING is enabled, according to byte-compile-warnings.
Probably introduced at or before Emacs version 23.1.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
;;;###autoload
(defun byte-compile-warning-enabled-p (warning &optional symbol)
"Return non-nil if WARNING is enabled, according to `byte-compile-warnings'."
(let ((suppress nil))
(dolist (elem byte-compile--suppressed-warnings)
(when (and (eq (car elem) warning)
(memq symbol (cdr elem)))
(setq suppress t)))
(and (not suppress)
;; During an Emacs build, we want all warnings.
(or (eq byte-compile-warnings 'all)
;; If t, we want almost all the warnings, but not the
;; ones that are Emacs build specific.
(and (not (memq warning byte-compile--emacs-build-warning-types))
(or (eq byte-compile-warnings t)
(if (eq (car byte-compile-warnings) 'not)
(not (memq warning byte-compile-warnings))
(memq warning byte-compile-warnings))))))))