]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/bytecomp.el
(make-char): Fix typo in docstring.
[gnu-emacs] / lisp / emacs-lisp / bytecomp.el
index 01f9373af687f36154459b9d2ad881fb258f91d6..02a88c13973837dd4efe5fa7f855bd3245b76e43 100644 (file)
@@ -357,7 +357,20 @@ Elements of the list may be be:
                      (const callargs) (const redefine)
                      (const obsolete) (const noruntime)
                      (const cl-functions) (const interactive-only))))
-;;;###autoload(put 'byte-compile-warnings 'safe-local-variable 'booleanp)
+(put 'byte-compile-warnings 'safe-local-variable 'byte-compile-warnings-safe-p)
+;;;###autoload
+(defun byte-compile-warnings-safe-p (x)
+  (or (booleanp x)
+      (and (listp x)
+          (equal (mapcar
+                  (lambda (e)
+                    (when (memq e '(free-vars unresolved
+                                    callargs redefine
+                                    obsolete noruntime
+                                    cl-functions interactive-only))
+                      e))
+                  x)
+                 x))))
 
 (defvar byte-compile-interactive-only-functions
   '(beginning-of-buffer end-of-buffer replace-string replace-regexp
@@ -2778,7 +2791,7 @@ That command is designed for interactive use only" fn))
                     ;; `cl-byte-compile-compiler-macro' but if CL isn't
                     ;; loaded, this function doesn't exist.
                     (or (not (memq handler '(cl-byte-compile-compiler-macro)))
-                        (fboundp handler))
+                        (functionp handler))
                    (not (and (byte-compile-version-cond
                                byte-compile-compatibility)
                               (get (get fn 'byte-opcode) 'emacs19-opcode))))