Fix documentation of define-obsolete-* functions
* doc/lispref/functions.texi (Obsolete Functions): Make documentation of functions that obsolete symbols match the advertised calling conventions. * lisp/emacs-lisp/byte-run.el (define-obsolete-function-alias) (define-obsolete-variable-alias, define-obsolete-face-alias): State in the doc strings that WHEN is a mandatory argument, to be consistent with the advertised calling convention. (Bug#38675)
This commit is contained in:
parent
3434ac67b9
commit
32222fb34c
2 changed files with 9 additions and 9 deletions
|
@ -2090,7 +2090,7 @@ alias for a function or macro can also be marked as obsolete; this
|
||||||
makes the alias itself obsolete, not the function or macro which it
|
makes the alias itself obsolete, not the function or macro which it
|
||||||
resolves to.
|
resolves to.
|
||||||
|
|
||||||
@defun make-obsolete obsolete-name current-name &optional when
|
@defun make-obsolete obsolete-name current-name when
|
||||||
This function marks @var{obsolete-name} as obsolete.
|
This function marks @var{obsolete-name} as obsolete.
|
||||||
@var{obsolete-name} should be a symbol naming a function or macro, or
|
@var{obsolete-name} should be a symbol naming a function or macro, or
|
||||||
an alias for a function or macro.
|
an alias for a function or macro.
|
||||||
|
@ -2104,11 +2104,11 @@ should begin in lower case, and end with a period. It can also be
|
||||||
@code{nil}, in which case the warning message provides no additional
|
@code{nil}, in which case the warning message provides no additional
|
||||||
details.
|
details.
|
||||||
|
|
||||||
If provided, @var{when} should be a string indicating when the function
|
The argument @var{when} should be a string indicating when the function
|
||||||
was first made obsolete---for example, a date or a release number.
|
was first made obsolete---for example, a date or a release number.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defmac define-obsolete-function-alias obsolete-name current-name &optional when doc
|
@defmac define-obsolete-function-alias obsolete-name current-name when &optional doc
|
||||||
This convenience macro marks the function @var{obsolete-name} obsolete
|
This convenience macro marks the function @var{obsolete-name} obsolete
|
||||||
and also defines it as an alias for the function @var{current-name}.
|
and also defines it as an alias for the function @var{current-name}.
|
||||||
It is equivalent to the following:
|
It is equivalent to the following:
|
||||||
|
|
|
@ -378,8 +378,8 @@ is equivalent to the following two lines of code:
|
||||||
\(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")
|
\(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")
|
||||||
\(make-obsolete \\='old-fun \\='new-fun \"22.1\")
|
\(make-obsolete \\='old-fun \\='new-fun \"22.1\")
|
||||||
|
|
||||||
If provided, WHEN should be a string indicating when the function
|
WHEN should be a string indicating when the function was first
|
||||||
was first made obsolete, for example a date or a release number.
|
made obsolete, for example a date or a release number.
|
||||||
|
|
||||||
See the docstrings of `defalias' and `make-obsolete' for more details."
|
See the docstrings of `defalias' and `make-obsolete' for more details."
|
||||||
(declare (doc-string 4)
|
(declare (doc-string 4)
|
||||||
|
@ -423,8 +423,8 @@ dumped with Emacs). This is so that any user customizations are
|
||||||
applied before the defcustom tries to initialize the
|
applied before the defcustom tries to initialize the
|
||||||
variable (this is due to the way `defvaralias' works).
|
variable (this is due to the way `defvaralias' works).
|
||||||
|
|
||||||
If provided, WHEN should be a string indicating when the variable
|
WHEN should be a string indicating when the variable was first
|
||||||
was first made obsolete, for example a date or a release number.
|
made obsolete, for example a date or a release number.
|
||||||
|
|
||||||
For the benefit of Customize, if OBSOLETE-NAME has
|
For the benefit of Customize, if OBSOLETE-NAME has
|
||||||
any of the following properties, they are copied to
|
any of the following properties, they are copied to
|
||||||
|
@ -450,8 +450,8 @@ CURRENT-NAME, if it does not already have them:
|
||||||
;; It only really affects M-x describe-face output.
|
;; It only really affects M-x describe-face output.
|
||||||
(defmacro define-obsolete-face-alias (obsolete-face current-face when)
|
(defmacro define-obsolete-face-alias (obsolete-face current-face when)
|
||||||
"Make OBSOLETE-FACE a face alias for CURRENT-FACE and mark it obsolete.
|
"Make OBSOLETE-FACE a face alias for CURRENT-FACE and mark it obsolete.
|
||||||
If provided, WHEN should be a string indicating when the face
|
WHEN should be a string indicating when the face was first made
|
||||||
was first made obsolete, for example a date or a release number."
|
obsolete, for example a date or a release number."
|
||||||
`(progn
|
`(progn
|
||||||
(put ,obsolete-face 'face-alias ,current-face)
|
(put ,obsolete-face 'face-alias ,current-face)
|
||||||
;; Used by M-x describe-face.
|
;; Used by M-x describe-face.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue