# HG changeset patch # User Juanma Barranquero # Date 1026747471 0 # Node ID 0533d978a8ab32d19f1a9330369dc23eea745654 # Parent e54dcde23afdbb2e5de6fe2a790161edd088b2fe (Fdefvaralias): Add docstring argument. diff -r e54dcde23afd -r 0533d978a8ab src/eval.c --- a/src/eval.c Mon Jul 15 12:06:01 2002 +0000 +++ b/src/eval.c Mon Jul 15 15:37:51 2002 +0000 @@ -710,16 +710,17 @@ } -DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 2, 0, +DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0, doc: /* Make SYMBOL a variable alias for symbol 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. -ALIASED nil means remove the alias; SYMBOL is unbound after that. */) - (symbol, aliased) - Lisp_Object symbol, aliased; +ALIASED nil means remove the alias; SYMBOL is unbound after that. +Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. */) + (symbol, aliased, docstring) + Lisp_Object symbol, aliased, docstring; { struct Lisp_Symbol *sym; - + CHECK_SYMBOL (symbol); CHECK_SYMBOL (aliased); @@ -731,7 +732,9 @@ sym->value = aliased; sym->constant = SYMBOL_CONSTANT_P (aliased); LOADHIST_ATTACH (symbol); - + if (!NILP (docstring)) + Fput (symbol, Qvariable_documentation, docstring); + return aliased; }