Function: define-obsolete-function-alias
define-obsolete-function-alias is a macro defined in byte-run.el.gz.
Signature
(define-obsolete-function-alias OBSOLETE-NAME CURRENT-NAME WHEN &optional DOCSTRING)
Documentation
Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.
(define-obsolete-function-alias 'old-fun 'new-fun "28.1" "old-fun's doc.")
is equivalent to the following two lines of code:
(defalias 'old-fun 'new-fun "old-fun's doc.")
(make-obsolete 'old-fun 'new-fun "28.1")
WHEN should be a string indicating when the function was first made obsolete, for example a date or a release number.
See the docstrings of defalias and make-obsolete for more details.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/byte-run.el.gz
(defmacro define-obsolete-function-alias ( obsolete-name current-name when
&optional docstring)
"Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.
\(define-obsolete-function-alias \\='old-fun \\='new-fun \"28.1\" \
\"old-fun's doc.\")
is equivalent to the following two lines of code:
\(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")
\(make-obsolete \\='old-fun \\='new-fun \"28.1\")
WHEN should be a string indicating when the function was first
made obsolete, for example a date or a release number.
See the docstrings of `defalias' and `make-obsolete' for more details."
(declare (doc-string 4))
`(progn
(defalias ,obsolete-name ,current-name ,docstring)
(make-obsolete ,obsolete-name ,current-name ,when)))