Function: byte-compile-warn-obsolete

byte-compile-warn-obsolete is an autoloaded and byte-compiled function defined in bytecomp.el.gz.

Signature

(byte-compile-warn-obsolete SYMBOL TYPE)

Documentation

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

TYPE is a string that say which one of these three types it is.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
;;;###autoload
(defun byte-compile-warn-obsolete (symbol type)
  "Warn that SYMBOL (a variable, function or generalized variable) is obsolete.
TYPE is a string that say which one of these three types it is."
  (when (byte-compile-warning-enabled-p 'obsolete symbol)
    (byte-compile-warn-x
     symbol "%s"
     (macroexp--obsolete-warning
      symbol
      (pcase type
        ("function"
         (get symbol 'byte-obsolete-info))
        ("variable"
         (get symbol 'byte-obsolete-variable))
        ("generalized variable"
         (get symbol 'byte-obsolete-generalized-variable)))
      type))))