diff options
| author | Eli Zaretskii | 2019-12-28 11:13:25 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-12-28 11:13:25 +0200 |
| commit | 32222fb34cc784f0cfc1716294818fd69233b06c (patch) | |
| tree | d422c228640d6088bda8e6227bc9abd45c95c09c | |
| parent | 3434ac67b9ec6b1d19f1c5ebb7d23b0b62dadac9 (diff) | |
| download | emacs-32222fb34cc784f0cfc1716294818fd69233b06c.tar.gz emacs-32222fb34cc784f0cfc1716294818fd69233b06c.zip | |
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)
| -rw-r--r-- | doc/lispref/functions.texi | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/byte-run.el | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 6157f9a535b..4307aab9268 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -2090,7 +2090,7 @@ alias for a function or macro can also be marked as obsolete; this | |||
| 2090 | makes the alias itself obsolete, not the function or macro which it | 2090 | makes the alias itself obsolete, not the function or macro which it |
| 2091 | resolves to. | 2091 | resolves to. |
| 2092 | 2092 | ||
| 2093 | @defun make-obsolete obsolete-name current-name &optional when | 2093 | @defun make-obsolete obsolete-name current-name when |
| 2094 | This function marks @var{obsolete-name} as obsolete. | 2094 | This function marks @var{obsolete-name} as obsolete. |
| 2095 | @var{obsolete-name} should be a symbol naming a function or macro, or | 2095 | @var{obsolete-name} should be a symbol naming a function or macro, or |
| 2096 | an alias for a function or macro. | 2096 | 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 | |||
| 2104 | @code{nil}, in which case the warning message provides no additional | 2104 | @code{nil}, in which case the warning message provides no additional |
| 2105 | details. | 2105 | details. |
| 2106 | 2106 | ||
| 2107 | If provided, @var{when} should be a string indicating when the function | 2107 | The argument @var{when} should be a string indicating when the function |
| 2108 | was first made obsolete---for example, a date or a release number. | 2108 | was first made obsolete---for example, a date or a release number. |
| 2109 | @end defun | 2109 | @end defun |
| 2110 | 2110 | ||
| 2111 | @defmac define-obsolete-function-alias obsolete-name current-name &optional when doc | 2111 | @defmac define-obsolete-function-alias obsolete-name current-name when &optional doc |
| 2112 | This convenience macro marks the function @var{obsolete-name} obsolete | 2112 | This convenience macro marks the function @var{obsolete-name} obsolete |
| 2113 | and also defines it as an alias for the function @var{current-name}. | 2113 | and also defines it as an alias for the function @var{current-name}. |
| 2114 | It is equivalent to the following: | 2114 | It is equivalent to the following: |
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 1115c096679..3737473b63b 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -378,8 +378,8 @@ is equivalent to the following two lines of code: | |||
| 378 | \(defalias \\='old-fun \\='new-fun \"old-fun's doc.\") | 378 | \(defalias \\='old-fun \\='new-fun \"old-fun's doc.\") |
| 379 | \(make-obsolete \\='old-fun \\='new-fun \"22.1\") | 379 | \(make-obsolete \\='old-fun \\='new-fun \"22.1\") |
| 380 | 380 | ||
| 381 | If provided, WHEN should be a string indicating when the function | 381 | WHEN should be a string indicating when the function was first |
| 382 | was first made obsolete, for example a date or a release number. | 382 | made obsolete, for example a date or a release number. |
| 383 | 383 | ||
| 384 | See the docstrings of `defalias' and `make-obsolete' for more details." | 384 | See the docstrings of `defalias' and `make-obsolete' for more details." |
| 385 | (declare (doc-string 4) | 385 | (declare (doc-string 4) |
| @@ -423,8 +423,8 @@ dumped with Emacs). This is so that any user customizations are | |||
| 423 | applied before the defcustom tries to initialize the | 423 | applied before the defcustom tries to initialize the |
| 424 | variable (this is due to the way `defvaralias' works). | 424 | variable (this is due to the way `defvaralias' works). |
| 425 | 425 | ||
| 426 | If provided, WHEN should be a string indicating when the variable | 426 | WHEN should be a string indicating when the variable was first |
| 427 | was first made obsolete, for example a date or a release number. | 427 | made obsolete, for example a date or a release number. |
| 428 | 428 | ||
| 429 | For the benefit of Customize, if OBSOLETE-NAME has | 429 | For the benefit of Customize, if OBSOLETE-NAME has |
| 430 | any of the following properties, they are copied to | 430 | any of the following properties, they are copied to |
| @@ -450,8 +450,8 @@ CURRENT-NAME, if it does not already have them: | |||
| 450 | ;; It only really affects M-x describe-face output. | 450 | ;; It only really affects M-x describe-face output. |
| 451 | (defmacro define-obsolete-face-alias (obsolete-face current-face when) | 451 | (defmacro define-obsolete-face-alias (obsolete-face current-face when) |
| 452 | "Make OBSOLETE-FACE a face alias for CURRENT-FACE and mark it obsolete. | 452 | "Make OBSOLETE-FACE a face alias for CURRENT-FACE and mark it obsolete. |
| 453 | If provided, WHEN should be a string indicating when the face | 453 | WHEN should be a string indicating when the face was first made |
| 454 | was first made obsolete, for example a date or a release number." | 454 | obsolete, for example a date or a release number." |
| 455 | `(progn | 455 | `(progn |
| 456 | (put ,obsolete-face 'face-alias ,current-face) | 456 | (put ,obsolete-face 'face-alias ,current-face) |
| 457 | ;; Used by M-x describe-face. | 457 | ;; Used by M-x describe-face. |