summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2010-11-25 12:56:41 +0900
committerKenichi Handa <handa@m17n.org>2010-11-25 12:56:41 +0900
commite957f9ae90f3cab1584c06877cbff075d52a6a9a (patch)
treed19aea6f4c6a3e369604ab8bc97be6d419073b0c /lisp/emacs-lisp/bytecomp.el
parentb84ae584330c940010bc543fd925eddeb13fd9e2 (diff)
parent33aeea0eb66921329fde41e14cfda2565c6bad6d (diff)
downloademacs-e957f9ae90f3cab1584c06877cbff075d52a6a9a.tar.gz
emacs-e957f9ae90f3cab1584c06877cbff075d52a6a9a.tar.bz2
emacs-e957f9ae90f3cab1584c06877cbff075d52a6a9a.zip
merge emacs-23
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el17
1 files changed, 4 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 394169be99d..cdfac80ca78 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -294,21 +294,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'."