diff options
| author | Richard M. Stallman | 2005-04-26 10:55:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-04-26 10:55:24 +0000 |
| commit | a33db1ddfc329267fb02a19035da631a61895f70 (patch) | |
| tree | 2950617d0bf23becf7fb70af51936670e7b1f657 | |
| parent | b98ba93aa4b3a6d3e2d3b6ee5c1964b5f3fa876b (diff) | |
| download | emacs-a33db1ddfc329267fb02a19035da631a61895f70.tar.gz emacs-a33db1ddfc329267fb02a19035da631a61895f70.zip | |
(Variable Aliases): Clarify text.
| -rw-r--r-- | lispref/variables.texi | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/lispref/variables.texi b/lispref/variables.texi index 49a8f0d7a26..b39c4abb719 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1714,31 +1714,37 @@ of the variable at the end of the chain of aliases. | |||
| 1714 | This function returns @var{base-var}. | 1714 | This function returns @var{base-var}. |
| 1715 | @end defun | 1715 | @end defun |
| 1716 | 1716 | ||
| 1717 | Variables aliases are often used prior to replacing an old name for a variable | 1717 | Variable aliases are convenient for replacing an old name for a |
| 1718 | with a new name. To allow some time for existing code to adapt to this change, | 1718 | variable with a new name. @code{make-obsolete-variable} declares that |
| 1719 | @code{make-obsolete-variable} declares that the old name is obsolete and | 1719 | the old name is obsolete and therefore that it may be removed at some |
| 1720 | therefore that it may be removed at some stage in the future. | 1720 | stage in the future. |
| 1721 | 1721 | ||
| 1722 | @defmac make-obsolete-variable variable new &optional when | 1722 | @defmac make-obsolete-variable variable new &optional when |
| 1723 | This macro makes the byte-compiler warn that symbol @var{variable} is | 1723 | This macro makes the byte-compiler warn that the variable |
| 1724 | obsolete and that symbol @var{new} should be used instead. If | 1724 | @var{variable} is obsolete. If @var{new} is a symbol, it is the |
| 1725 | @var{new} is a string, this is the message and there is no replacement | 1725 | variable's new name; the warning messages say to use @var{new} |
| 1726 | variable. If it is provided, @var{when} should be a string indicating | 1726 | instead of @var{variable}. |
| 1727 | when the variable was first made obsolete, for example a date or a | 1727 | If @var{new} is a string, this is the message and there is no |
| 1728 | release number. | 1728 | replacement variable. |
| 1729 | |||
| 1730 | If provided, @var{when} should be a string indicating when the | ||
| 1731 | variable was first made obsolete---for example, a date or a release | ||
| 1732 | number. | ||
| 1729 | @end defmac | 1733 | @end defmac |
| 1730 | 1734 | ||
| 1731 | You can make two variables synonyms and declare one obsolete at the | 1735 | You can make two variables synonyms and declare one obsolete at the |
| 1732 | same time using the macro @code{define-obsolete-variable-alias}. | 1736 | same time using the macro @code{define-obsolete-variable-alias}. |
| 1733 | 1737 | ||
| 1734 | @defmac define-obsolete-variable-alias variable new &optional when docstring | 1738 | @defmac define-obsolete-variable-alias variable new &optional when docstring |
| 1735 | This macro defines the symbol @var{variable} as a variable alias for | 1739 | This macro marks the variable @var{variable} as obsolete and also |
| 1736 | symbol @var{new} and warns that @var{variable} is obsolete. If it is | 1740 | makes it an alias for the variable @var{new}. |
| 1737 | provided, @var{when} should be a string indicating when @var{variable} | 1741 | |
| 1738 | was first made obsolete. The optional argument @var{docstring} | 1742 | If provided, @var{when} should be a string indicating when |
| 1739 | specifies the documentation string for @var{variable}. If | 1743 | @var{variable} was first made obsolete. The optional argument |
| 1740 | @var{docstring} is omitted or nil, @var{variable} uses the | 1744 | @var{docstring} specifies the documentation string for @var{variable}. |
| 1741 | documentation string of @var{new} unless it already has one. | 1745 | If @var{docstring} is omitted or nil, @var{variable} uses the |
| 1746 | documentation string of @var{new} unless it already has one of its | ||
| 1747 | own. | ||
| 1742 | @end defmac | 1748 | @end defmac |
| 1743 | 1749 | ||
| 1744 | @defun indirect-variable variable | 1750 | @defun indirect-variable variable |