Function: byte-compile-disable-warning

byte-compile-disable-warning is an autoloaded and byte-compiled function defined in bytecomp.el.gz.

Signature

(byte-compile-disable-warning WARNING)

Documentation

Change byte-compile-warnings to disable WARNING.

If byte-compile-warnings is t, set it to (not WARNING). Otherwise, if the first element is not, add WARNING, else remove it. Normally you should let-bind byte-compile-warnings before calling this, else the global value will be modified.

Probably introduced at or before Emacs version 23.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
;;;###autoload
(defun byte-compile-disable-warning (warning)
  "Change `byte-compile-warnings' to disable WARNING.
If `byte-compile-warnings' is t, set it to `(not WARNING)'.
Otherwise, if the first element is `not', add WARNING, else remove it.
Normally you should let-bind `byte-compile-warnings' before calling this,
else the global value will be modified."
  (setq byte-compile-warnings
        (cond ((eq byte-compile-warnings t)
               (list 'not warning))
              ((eq (car byte-compile-warnings) 'not)
               (if (memq warning byte-compile-warnings)
                   byte-compile-warnings
                 (append byte-compile-warnings (list warning))))
              (t
               (delq warning byte-compile-warnings)))))