Function: warning-suppress-p
warning-suppress-p is a byte-compiled function defined in
warnings.el.gz.
Signature
(warning-suppress-p TYPE SUPPRESS-LIST)
Documentation
Non-nil if a warning with type TYPE should be suppressed.
SUPPRESS-LIST is the list of kinds of warnings to suppress.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/warnings.el.gz
(defun warning-suppress-p (type suppress-list)
"Non-nil if a warning with type TYPE should be suppressed.
SUPPRESS-LIST is the list of kinds of warnings to suppress."
(let (some-match)
(dolist (elt suppress-list)
(if (symbolp type)
;; If TYPE is a symbol, the ELT must be (TYPE).
(if (and (consp elt)
(eq (car elt) type)
(null (cdr elt)))
(setq some-match t))
;; If TYPE is a list, ELT must match it or some initial segment of it.
(let ((tem1 type)
(tem2 elt)
(match t))
;; Check elements of ELT until we run out of them.
(while tem2
(if (not (equal (car tem1) (car tem2)))
(setq match nil))
(setq tem1 (cdr tem1)
tem2 (cdr tem2)))
;; If ELT is an initial segment of TYPE, MATCH is t now.
;; So set SOME-MATCH.
(if match
(setq some-match t)))))
;; If some element of SUPPRESS-LIST matched,
;; we return t.
some-match))