Function: byte-compile-warn-obsolete

byte-compile-warn-obsolete is a byte-compiled function defined in bytecomp.el.gz.

Signature

(byte-compile-warn-obsolete SYMBOL)

Documentation

Warn that SYMBOL (a variable or function) is obsolete.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defun byte-compile-warn-obsolete (symbol)
  "Warn that SYMBOL (a variable or function) is obsolete."
  (when (byte-compile-warning-enabled-p 'obsolete symbol)
    (let* ((funcp (get symbol 'byte-obsolete-info))
           (msg (macroexp--obsolete-warning
                 symbol
                 (or funcp (get symbol 'byte-obsolete-variable))
                 (if funcp "function" "variable"))))
      (unless (and funcp (memq symbol byte-compile-not-obsolete-funcs))
	(byte-compile-warn "%s" msg)))))