1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

(Fdefvaralias): Add docstring argument.

This commit is contained in:
Juanma Barranquero 2002-07-15 15:37:51 +00:00
parent 6747a521ac
commit 1848d15dad

View File

@ -710,16 +710,17 @@ usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */)
} }
DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 2, 0, DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0,
doc: /* Make SYMBOL a variable alias for symbol ALIASED. doc: /* Make SYMBOL a variable alias for symbol ALIASED.
Setting the value of SYMBOL will subsequently set the value of ALIASED, Setting the value of SYMBOL will subsequently set the value of ALIASED,
and getting the value of SYMBOL will return the value ALIASED has. and getting the value of SYMBOL will return the value ALIASED has.
ALIASED nil means remove the alias; SYMBOL is unbound after that. */) ALIASED nil means remove the alias; SYMBOL is unbound after that.
(symbol, aliased) Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. */)
Lisp_Object symbol, aliased; (symbol, aliased, docstring)
Lisp_Object symbol, aliased, docstring;
{ {
struct Lisp_Symbol *sym; struct Lisp_Symbol *sym;
CHECK_SYMBOL (symbol); CHECK_SYMBOL (symbol);
CHECK_SYMBOL (aliased); CHECK_SYMBOL (aliased);
@ -731,7 +732,9 @@ ALIASED nil means remove the alias; SYMBOL is unbound after that. */)
sym->value = aliased; sym->value = aliased;
sym->constant = SYMBOL_CONSTANT_P (aliased); sym->constant = SYMBOL_CONSTANT_P (aliased);
LOADHIST_ATTACH (symbol); LOADHIST_ATTACH (symbol);
if (!NILP (docstring))
Fput (symbol, Qvariable_documentation, docstring);
return aliased; return aliased;
} }