changeset 93457:4d3eb46a3b84

(byte-compile-warnings-safe-p): Use `byte-compile-warning-types'. Add docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 31 Mar 2008 11:02:04 +0000
parents dc103c655cd1
children f1bc4ab23ada
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Mon Mar 31 07:51:16 2008 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Mon Mar 31 11:02:04 2008 +0000
@@ -378,17 +378,14 @@
 
 ;;;###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))))