aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/byte-run.el33
1 files changed, 21 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 3728eea8bf8..1472d576e49 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -116,12 +116,16 @@ was first made obsolete, for example a date or a release number."
116 116
117(defmacro define-obsolete-function-alias (function new 117(defmacro define-obsolete-function-alias (function new
118 &optional when docstring) 118 &optional when docstring)
119 "Set FUNCTION's function definition to NEW and warn that FUNCTION is obsolete. 119 "Set FUNCTION's function definition to NEW and mark it obsolete.
120If provided, WHEN should be a string indicating when FUNCTION was 120
121first made obsolete, for example a date or a release number. The 121\(define-obsolete-function-alias 'old-fun 'new-fun \"22.1\" \"old-fun's doc.\")
122optional argument DOCSTRING specifies the documentation string 122
123for FUNCTION; if DOCSTRING is omitted or nil, FUNCTION uses the 123is equivalent to the following two lines of code:
124documentation string of NEW unless it already has one." 124
125\(defalias 'old-fun 'new-fun \"old-fun's doc.\")
126\(make-obsolete 'old-fun 'new-fun \"22.1\")
127
128See the docstrings of `defalias' and `make-obsolete' for more details."
125 `(progn 129 `(progn
126 (defalias ,function ,new ,docstring) 130 (defalias ,function ,new ,docstring)
127 (make-obsolete ,function ,new ,when))) 131 (make-obsolete ,function ,new ,when)))
@@ -143,12 +147,17 @@ was first made obsolete, for example a date or a release number."
143 147
144(defmacro define-obsolete-variable-alias (variable new 148(defmacro define-obsolete-variable-alias (variable new
145 &optional when docstring) 149 &optional when docstring)
146 "Make VARIABLE a variable alias for NEW and warn that VARIABLE is obsolete. 150 "Make VARIABLE a variable alias for NEW and mark it obsolete.
147If provided, WHEN should be a string indicating when VARIABLE was 151
148first made obsolete, for example a date or a release number. The 152\(define-obsolete-variable-alias 'old-var 'new-var \"22.1\" \"old-var's doc.\")
149optional argument DOCSTRING specifies the documentation string 153
150for VARIABLE; if DOCSTRING is omitted or nil, VARIABLE uses the 154is equivalent to the following two lines of code:
151documentation string of NEW unless it already has one." 155
156\(defvaralias 'old-var 'new-var \"old-var's doc.\")
157\(make-obsolete-variable 'old-var 'new-var \"22.1\")
158
159See the docstrings of `defvaralias' and `make-obsolete-variable' or
160Info node `(elisp)Variable Aliases' for more details."
152 `(progn 161 `(progn
153 (defvaralias ,variable ,new ,docstring) 162 (defvaralias ,variable ,new ,docstring)
154 (make-obsolete-variable ,variable ,new ,when))) 163 (make-obsolete-variable ,variable ,new ,when)))