1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

(byte-compile-warnings-safe-p): Use `byte-compile-warning-types'.

Add docstring.
This commit is contained in:
Juanma Barranquero 2008-03-31 11:02:04 +00:00
parent fb9e0d3494
commit daedb19635

View File

@ -378,17 +378,14 @@ suppress. For example, (not mapcar) will suppress warnings about mapcar."
;;;###autoload
(defun byte-compile-warnings-safe-p (x)
"Return non-nil if X is valid as a value of `byte-compile-warnings'."
(or (booleanp x)
(and (listp x)
(if (eq (car x) 'not) (setq x (cdr x))
t)
(equal (mapcar
(lambda (e)
(when (memq e '(free-vars unresolved
callargs redefine
obsolete noruntime
cl-functions interactive-only
make-local mapcar))
(when (memq e byte-compile-warning-types)
e))
x)
x))))