]> git.eshelyaron.com Git - emacs.git/commitdiff
(byte-compile-warnings-safe-p): Use `byte-compile-warning-types'.
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 31 Mar 2008 11:02:04 +0000 (11:02 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 31 Mar 2008 11:02:04 +0000 (11:02 +0000)
Add docstring.

lisp/emacs-lisp/bytecomp.el

index 2aeefc38e8cd6159fac8ebe934ce1c4a651543ec..1ba4de2f3544e6698abc149f41198bbf18381b8b 100644 (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))))