diff options
| author | Juanma Barranquero | 2002-07-15 15:50:20 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2002-07-15 15:50:20 +0000 |
| commit | 32ebbc3a73a04275929dc5625f5917fd6dc93a41 (patch) | |
| tree | dc78100dac839a90f4df96e9ff6dc23bc5ea591a | |
| parent | d907a3bffcc8890b120f8d18090573d02993323e (diff) | |
| download | emacs-32ebbc3a73a04275929dc5625f5917fd6dc93a41.tar.gz emacs-32ebbc3a73a04275929dc5625f5917fd6dc93a41.zip | |
Document third argument of defvaralias.
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lispref/variables.texi | 8 |
2 files changed, 10 insertions, 3 deletions
| @@ -1517,13 +1517,16 @@ searching for an executable resp. an elisp file. | |||
| 1517 | 1517 | ||
| 1518 | ** Variable aliases have been implemented: | 1518 | ** Variable aliases have been implemented: |
| 1519 | 1519 | ||
| 1520 | - Macro: defvaralias ALIAS-VAR BASE-VAR | 1520 | - Macro: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] |
| 1521 | 1521 | ||
| 1522 | This defines the symbol ALIAS-VAR as a variable alias for symbol | 1522 | This defines the symbol ALIAS-VAR as a variable alias for symbol |
| 1523 | BASE-VAR. This means that retrieving the value of ALIAS-VAR returns | 1523 | BASE-VAR. This means that retrieving the value of ALIAS-VAR returns |
| 1524 | the value of BASE-VAR, and changing the value of ALIAS-VAR changes the | 1524 | the value of BASE-VAR, and changing the value of ALIAS-VAR changes the |
| 1525 | value of BASE-VAR. | 1525 | value of BASE-VAR. |
| 1526 | 1526 | ||
| 1527 | DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has | ||
| 1528 | the same documentation as BASE-VAR. | ||
| 1529 | |||
| 1527 | - Function: indirect-variable VARIABLE | 1530 | - Function: indirect-variable VARIABLE |
| 1528 | 1531 | ||
| 1529 | This function returns the variable at the end of the chain of aliases | 1532 | This function returns the variable at the end of the chain of aliases |
diff --git a/lispref/variables.texi b/lispref/variables.texi index d7a5929bcfb..197390e0b7d 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1676,11 +1676,15 @@ chosen, or because its meaning has partly changed---it can be useful | |||
| 1676 | to keep the old name as an @emph{alias} of the new one for | 1676 | to keep the old name as an @emph{alias} of the new one for |
| 1677 | compatibility. You can do this with @code{defvaralias}. | 1677 | compatibility. You can do this with @code{defvaralias}. |
| 1678 | 1678 | ||
| 1679 | @defmac defvaralias alias-var base-var | 1679 | @defmac defvaralias alias-var base-var [docstring] |
| 1680 | This function defines the symbol @var{alias-var} as a variable alias | 1680 | This function defines the symbol @var{alias-var} as a variable alias |
| 1681 | for symbol @var{base-var}. This means that retrieving the value of | 1681 | for symbol @var{base-var}. This means that retrieving the value of |
| 1682 | @var{alias-var} returns the value of @var{base-var}, and changing the | 1682 | @var{alias-var} returns the value of @var{base-var}, and changing the |
| 1683 | value of @var{alias-var} changes the value of @var{base-var}. | 1683 | value of @var{alias-var} changes the value of @var{base-var}. |
| 1684 | |||
| 1685 | If the @var{docstring} argument is present, it specifies the documentation for | ||
| 1686 | @var{alias-var}; otherwise, it has the same documentation that @var{base-var}, | ||
| 1687 | if any. | ||
| 1684 | @end defmac | 1688 | @end defmac |
| 1685 | 1689 | ||
| 1686 | @defun indirect-variable variable | 1690 | @defun indirect-variable variable |