diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-17 22:54:14 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-17 22:54:14 -0500 |
commit | 4a47c2757309e338321da1e7a2f6d399a306ce7d (patch) | |
tree | de441bac2c90c3302459c5f0ffe9c53ec4b31c2f /lisp/emacs-lisp/bytecomp.el | |
parent | 8bbb7dd8a6d08540a81a7a2baa2274d8e6d65c92 (diff) | |
parent | b916cbefa481920a49eac03c7025693f38afc882 (diff) | |
download | emacs-4a47c2757309e338321da1e7a2f6d399a306ce7d.tar.gz |
Merge from emacs-23
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index f1adc5b496c..f04aad994f3 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -301,21 +301,12 @@ suppress. For example, (not mapcar) will suppress warnings about mapcar." (set :menu-tag "Some" ,@(mapcar (lambda (x) `(const ,x)) byte-compile-warning-types)))) -;;;###autoload(put 'byte-compile-warnings 'safe-local-variable 'byte-compile-warnings-safe-p) ;;;###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 byte-compile-warning-types) - e)) - x) - x)))) +(put 'byte-compile-warnings 'safe-local-variable + (lambda (v) + (or (symbolp v) + (null (delq nil (mapcar (lambda (x) (not (symbolp x))) v)))))) (defun byte-compile-warning-enabled-p (warning) "Return non-nil if WARNING is enabled, according to `byte-compile-warnings'." |