Mercurial > emacs
changeset 37862:a852a87500d2
*** empty log message ***
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 28 May 2001 12:24:49 +0000 |
parents | 829203873c2d |
children | 26de49e18fd7 |
files | lispref/variables.texi |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lispref/variables.texi Mon May 21 12:47:04 2001 +0000 +++ b/lispref/variables.texi Mon May 28 12:24:49 2001 +0000 @@ -1657,13 +1657,13 @@ @node Variable Aliases @section Variable Aliases - When maintaining Lisp programs, it is sometimes useful to make two -variables synonyms for each other, so that both variables invariably -refer to the same value. When a program variable slightly changes -meaning, or when a variable name was chosen badly to begin with, it is -desirable to rename that variable. For compatibility with older -versions of the program it is also desirable to not break code that -uses the original variable name. This can be done with + During the maintenance of Lisp programs, it is sometimes useful to +make two variables synonyms for each other, so that both variables +invariably refer to the same value. When a program variable slightly +changes meaning, or when a variable name is chosen badly to begin +with, it is desirable to rename that variable. For compatibility with +older versions of the program it is also desirable to not break code +using the original variable name. This can be done with @code{defvaralias}. @defun defvaralias old-name new-name @@ -1676,11 +1676,13 @@ @defun indirect-variable name This function returns the variable at the end of the variable chain of @var{name}. If @var{name} is not a symbol or if @var{name} -is not a variable alias, @var{name} is returned unchanged. +is not a variable alias, this function returns @var{name} unchanged. @end defun @example (defvaralias 'foo 'bar) +(indirect-variable 'foo) + @result{} bar (setq bar 2) bar @result{} 2