Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a33db1dd
Commit
a33db1dd
authored
Apr 26, 2005
by
Richard M. Stallman
Browse files
(Variable Aliases): Clarify text.
parent
b98ba93a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
17 deletions
+23
-17
lispref/variables.texi
lispref/variables.texi
+23
-17
No files found.
lispref/variables.texi
View file @
a33db1dd
...
...
@@ -1714,31 +1714,37 @@ of the variable at the end of the chain of aliases.
This function returns @var{base-var}.
@end defun
Variable
s
aliases are
often used prior to
replacing an old name for a
variable
with a new name.
To allow some time for existing code to adapt to this change,
@code{make-obsolete-variable} decla
re
s
that
the old name is obsolete and
therefore that it may be removed at some
stage in the future.
Variable aliases are
convenient for
replacing an old name for a
variable
with a new name.
@code{make-obsolete-variable} declares that
the old name is obsolete and therefo
re that
it may be removed at some
stage in the future.
@defmac make-obsolete-variable variable new &optional when
This macro makes the byte-compiler warn that symbol @var{variable} is
obsolete and that symbol @var{new} should be used instead. If
@var{new} is a string, this is the message and there is no replacement
variable. If it is provided, @var{when} should be a string indicating
when the variable was first made obsolete, for example a date or a
release number.
This macro makes the byte-compiler warn that the variable
@var{variable} is obsolete. If @var{new} is a symbol, it is the
variable's new name; the warning messages say to use @var{new}
instead of @var{variable}.
If @var{new} is a string, this is the message and there is no
replacement variable.
If provided, @var{when} should be a string indicating when the
variable was first made obsolete---for example, a date or a release
number.
@end defmac
You can make two variables synonyms and declare one obsolete at the
same time using the macro @code{define-obsolete-variable-alias}.
@defmac define-obsolete-variable-alias variable new &optional when docstring
This macro defines the symbol @var{variable} as a variable alias for
symbol @var{new} and warns that @var{variable} is obsolete. If it is
provided, @var{when} should be a string indicating when @var{variable}
was first made obsolete. The optional argument @var{docstring}
specifies the documentation string for @var{variable}. If
@var{docstring} is omitted or nil, @var{variable} uses the
documentation string of @var{new} unless it already has one.
This macro marks the variable @var{variable} as obsolete and also
makes it an alias for the variable @var{new}.
If provided, @var{when} should be a string indicating when
@var{variable} was first made obsolete. The optional argument
@var{docstring} specifies the documentation string for @var{variable}.
If @var{docstring} is omitted or nil, @var{variable} uses the
documentation string of @var{new} unless it already has one of its
own.
@end defmac
@defun indirect-variable variable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment